text:
"/>
<wire x1="35.56" y1="18.4912" x2="36.3728" y2="17.6784" width="0.254" layer="16"/>
<wire x1="35.56" y1="29.0576" x2="35.56" y2="18.4912" width="0.254" layer="16"/>
<wire x1="29.2608" y1="35.3568" x2="35.56" y2="29.0576" width="0.254" layer="16"/>
<wire x1="29.2608" y1="40.4368" x2="29.2608" y2="35.3568" width="0.254" layer="16"/>
<wire x1="22.9616" y1="46.736" x2="29.2608" y2="40.4368" width="0.254" layer="16"/>
<wire x1="22.9616" y1="60.96" x2="22.9616" y2="59.7408" width="0.254" layer="16"/>
<wire x1="22.9616" y1="59.7408" x2="22.9616" y2="46.736" width="0.254" layer="16"/>
<wire x1="22.9616" y1="60.96" x2="22.86" y2="60.96" width="0.254" layer="16"/>
<wire x1="34.7472" y1="60.96" x2="35.56" y2="60.96" width="0.254" layer="16"/>
<wire x1="33.528" y1="59.7408" x2="34.7472" y2="60.96" width="0.254" layer="16"/>
<wire x1="22.9616" y1="59.7408" x2="33.528" y2="59.7408" width="0.254" layer="16"/>
<wire x1="49.3776" y1="74.168" x2="49.3776" y2="74.7776" width="0.254" layer="16"/>
<wire x1="46.3296" y1="71.12" x2="49.3776" y2="74.168" width="0.254" layer="16"/>
<wire x1="42.2656" y1="71.12" x2="46.3296" y2="71.12" width="0.254" layer="16"/>
<wire x1="39.0144" y1="74.3712" x2="42.2656" y2="71.12" width="0.254" layer="16"/>
<wire x1="33.1216" y1="74.3712" x2="39.0144" y2="74.3712" width="0.254" layer="1"/>
<wire x1="24.1808" y1="65.4304" x2="33.1216" y2="74.3712" width="0.254" layer="1"/>
<wire x1="24.1808" y1="62.1792" x2="24.1808" y2="65.4304" width="0.254" layer="1"/>
<wire x1="22.9616" y1="60.96" x2="24.1808" y2="62.1792" width="0.254" layer="1"/>
<wire x1="49.3776" y1="74.7776" x2="49.53" y2="74.93" width="0.254" layer="16"/>
<wire x1="22.9616" y1="60.96" x2="22.86" y2="60.96" width="0.254" layer="1"/>
<via x="39.0144" y="74.3712" extent="1-16" drill="0.381"/>
</signal>
<signal name="HV2">
<contactref element="JP2" pad="2"/>
<contactref element="Q3" pad="1"/>
<contactref element="R10" pad="P$2"/>
<contactref element="R9" pad="P$1"/>
<wire x1="31.2928" y1="64.8208" x2="22.9616" y2="64.8208" width="0.254" layer="16"/>
<wire x1="32.512" y1="66.04" x2="31.2928" y2="64.8208" width="0.254" layer="16"/>
<wire x1="48.1584" y1="66.04" x2="32.512" y2="66.04" width="0.254" layer="16"/>
<wire x1="49.3776" y1="64.8208" x2="48.1584" y2="66.04" width="0.254" layer="16"/>
<wire x1="22.9616" y1="64.8208" x2="22.86" y2="64.77" width="0.254" layer="16"/>
<wire x1="49.3776" y1="64.8208" x2="49.53" y2="64.77" width="0.254" layer="16"/>
<wire x1="52.832" y1="19.304" x2="53.594" y2="19.304" width="0.254" layer="1"/>
<wire x1="51.2064" y1="17.6784" x2="52.832" y2="19.304" width="0.254" layer="1"/>
<wire x1="26.2128" y1="17.6784" x2="51.2064" y2="17.6784" width="0.254" layer="1"/>
<wire x1="25.4" y1="18.4912" x2="26.2128" y2="17.6784" width="0.254" layer="1"/>
<wire x1="25.4" y1="37.592" x2="25.4" y2="18.4912" width="0.254" layer="1"/>
<wire x1="21.5392" y1="41.4528" x2="25.4" y2="37.592" width="0.254" layer="1"/>
<wire x1="21.5392" y1="63.3984" x2="21.5392" y2="41.4528" width="0.254" layer="1"/>
<wire x1="22.7584" y1="64.6176" x2="21.5392" y2="63.3984" width="0.254" layer="1"/>
<wire x1="22.7584" y1="64.6176" x2="22.86" y2="64.77" width="0.254" layer="1"/>
<wire x1="51.816" y1="62.3824" x2="58.3184" y2="62.3824" width="0.254" layer="16"/>
<wire x1="49.5808" y1="64.6176" x2="51.816" y2="62.3824" width="0.254" layer="16"/>
<wire x1="58.3184" y1="62.3824" x2="58.42" y2="62.23" width="0.254" layer="16"/>
<wire x1="49.5808" y1="64.6176" x2="49.53" y2="64.77" width="0.254" layer="16"/>
</signal>
<signal name="HV">
<contactref element="R7" pad="P$1"/>
<contactref element="R4" pad="P$1"/>
<contactref element="JP2" pad="3"/>
<contactref element="R10" pad="P$1"/>
<contactref element="R5" pad="P$1"/>
<contactref element="K1" pad="COIL1"/>
<contactref element="K1" pad="NO"/>
<contactref element="JP4" pad="1"/>
<contactref element="DIO-" pad="1"/>
<wire x1="26.7462" y1="43.5864" x2="26.7462" y2="45.5676" width="0.254" layer="16"/>
<wire x1="33.02" y1="37.3126" x2="26.7462" y2="43.5864" width="0.254" layer="16"/>
<wire x1="33.02" y1="34.29" x2="33.02" y2="37.3126" width="1.778" layer="16"/>
<wire x1="26.7462" y1="45.5676" x2="26.67" y2="45.72" width="0.254" layer="16"/>
<wire x1="45.8978" y1="56.7944" x2="45.8978" y2="60.7568" width="0.254" layer="1"/>
<wire x1="46.5582" y1="56.134" x2="45.8978" y2="56.7944" width="0.254" layer="1"/>
<wire x1="46.5582" y1="49.8602" x2="46.5582" y2="56.134" width="0.254" layer="1"/>
<wire x1="46.8884" y1="49.53" x2="46.5582" y2="49.8602" width="0.254" layer="1"/>
<wire x1="45.8978" y1="60.7568" x2="45.72" y2="60.96" width="0.254" layer="1"/>
<wire x1="46.8884" y1="49.53" x2="46.92" y2="49.53" width="0.254" layer="1"/>
<wire x1="62.0776" y1="52.1716" x2="58.4454" y2="52.1716" width="0.254" layer="1"/>
<wire x1="58.4454" y1="52.1716" x2="58.42" y2="52.07" width="0.254" layer="1"/>
<wire x1="62.0776" y1="52.1716" x2="62.23" y2="52.07" width="0.254" layer="1"/>
<wire x1="62.4078" y1="68.0212" x2="62.4078" y2="75.946" width="0.254" layer="16"/>
<wire x1="64.389" y1="66.04" x2="62.4078" y2="68.0212" width="0.254" layer="16"/>
<wire x1="64.389" y1="54.1528" x2="64.389" y2="66.04" width="0.254" layer="16"/>
<wire x1="62.4078" y1="52.1716" x2="64.389" y2="54.1528" width="0.254" layer="16"/>
<wire x1="62.4078" y1="75.946" x2="62.23" y2="76.2" width="0.254" layer="16"/>
<wire x1="62.4078" y1="52.1716" x2="62.23" y2="52.07" width="0.254" layer="16"/>
<wire x1="55.8038" y1="49.53" x2="46.92" y2="49.53" width="0.254" layer="16"/>
<wire x1="58.1152" y1="51.8414" x2="55.8038" y2="49.53" width="0.254" layer="16"/>
<wire x1="58.1152" y1="51.8414" x2="58.42" y2="52.07" width="0.254" layer="16"/>
<wire x1="34.671" y1="37.3126" x2="33.02" y2="37.3126" width="1.778" layer="16"/>
<wire x1="46.8884" y1="49.53" x2="34.671" y2="37.3126" width="1.778" layer="16"/>
<wire x1="46.8884" y1="49.53" x2="46.92" y2="49.53" width="0.254" layer="16"/>
<wire x1="42.0624" y1="18.8976" x2="36.9824" y2="18.8976" width="0.254" layer="1"/>
<wire x1="42.8752" y1="18.0848" x2="42.0624" y2="18.8976" width="0.254" layer="1"/>
<wire x1="49.784" y1="18.0848" x2="42.8752" y2="18.0848" width="0.254" layer="1"/>
<wire x1="51.0032" y1="19.304" x2="49.784" y2="18.0848" width="0.254" layer="1"/>
<wire x1="36.9824" y1="18.8976" x2="36.83" y2="19.05" width="0.254" layer="1"/>
<wire x1="51.0032" y1="19.304" x2="51.054" y2="19.304" width="0.254" layer="1"/>
<wire x1="36.7792" y1="30.48" x2="36.7792" y2="19.1008" width="1.778" layer="16"/>
<wire x1="33.1216" y1="34.1376" x2="36.7792" y2="30.48" width="1.778" layer="16"/>
<wire x1="36.7792" y1="19.1008" x2="36.83" y2="19.05" width="0.254" layer="16"/>
<wire x1="33.1216" y1="34.1376" x2="33.02" y2="34.29" width="0.254" layer="16"/>
</signal>
<signal name="LV2">
<contactref element="JP1" pad="5"/>
<contactref element="Q3" pad="2"/>
<contactref element="R2" pad="P$2"/>
<contactref element="LED2" pad="A"/>
<wire x1="47.5488" y1="66.7004" x2="50.5206" y2="66.7004" width="0.254" layer="1"/>
<wire x1="45.8978" y1="68.3514" x2="47.5488" y2="66.7004" width="0.254" layer="1"/>
<wire x1="50.5206" y1="66.7004" x2="50.8" y2="66.675" width="0.254" layer="1"/>
<wire x1="45.8978" y1="68.3514" x2="45.72" y2="68.58" width="0.254" layer="1"/>
<wire x1="47.5488" y1="61.087" x2="47.5488" y2="66.7004" width="0.254" layer="1"/>
<wire x1="47.2186" y1="60.7568" x2="47.5488" y2="61.087" width="0.254" layer="1"/>
<wire x1="47.2186" y1="54.483" x2="47.2186" y2="60.7568" width="0.254" layer="1"/>
<wire x1="60.7568" y1="40.9448" x2="47.2186" y2="54.483" width="0.254" layer="1"/>
<wire x1="60.7568" y1="40.9448" x2="60.96" y2="40.64" width="0.254" layer="1"/>
<wire x1="37.9984" y1="76.4032" x2="37.9984" y2="77.216" width="0.254" layer="1"/>
<wire x1="45.72" y1="68.6816" x2="37.9984" y2="76.4032" width="0.254" layer="1"/>
<wire x1="37.9984" y1="77.216" x2="37.846" y2="77.216" width="0.254" layer="1"/>
<wire x1="45.72" y1="68.6816" x2="45.72" y2="68.58" width="0.254" layer="1"/>
</signal>
<signal name="LV1">
<contactref element="Q1" pad="2"/>
<contactref element="R3" pad="P$2"/>
<contactref element="JP1" pad="6"/>
<contactref element="LED1" pad="A"/>
<wire x1="45.5676" y1="63.0682" x2="45.5676" y2="64.7192" width="0.254" layer="1"/>
<wire x1="44.2468" y1="61.7474" x2="45.5676" y2="63.0682" width="0.254" layer="1"/>
<wire x1="44.2468" y1="56.7944" x2="44.2468" y2="61.7474" width="0.254" layer="1"/>
<wire x1="44.9072" y1="56.134" x2="44.2468" y2="56.7944" width="0.254" layer="1"/>
<wire x1="56.4642" y1="56.134" x2="44.9072" y2="56.134" width="0.254" layer="16"/>
<wire x1="60.7568" y1="51.8414" x2="56.4642" y2="56.134" width="0.254" layer="16"/>
<wire x1="60.7568" y1="48.5394" x2="60.7568" y2="51.8414" width="0.254" layer="16"/>
<wire x1="45.5676" y1="64.7192" x2="45.72" y2="64.77" width="0.254" layer="1"/>
<wire x1="60.7568" y1="48.5394" x2="60.96" y2="48.26" width="0.254" layer="16"/>
<wire x1="53.8226" y1="76.6064" x2="50.8508" y2="76.6064" width="0.254" layer="1"/>
<wire x1="63.7286" y1="66.7004" x2="53.8226" y2="76.6064" width="0.254" layer="1"/>
<wire x1="63.7286" y1="51.181" x2="63.7286" y2="66.7004" width="0.254" layer="1"/>
<wire x1="61.087" y1="48.5394" x2="63.7286" y2="51.181" width="0.254" layer="1"/>
<wire x1="50.8508" y1="76.6064" x2="50.8" y2="76.835" width="0.254" layer="1"/>
<wire x1="61.087" y1="48.5394" x2="60.96" y2="48.26" width="0.254" layer="1"/>
<via x="44.9072" y="56.134" extent="1-16" drill="0.6096"/>
<wire x1="50.5968" y1="77.216" x2="40.386" y2="77.216" width="0.254" layer="1"/>
<wire x1="50.8" y1="77.0128" x2="50.5968" y2="77.216" width="0.254" layer="1"/>
<wire x1="50.8" y1="77.0128" x2="50.8" y2="76.835" width="0.254" layer="1"/>
</signal>
<signal name="LV4">
<contactref element="Q2" pad="2"/>
<contactref element="R6" pad="P$2"/>
<contactref element="JP1" pad="1"/>
<wire x1="50.5206" y1="71.6534" x2="50.8" y2="71.755" width="0.254" layer="1"/>
<wire x1="55.4736" y1="75.946" x2="58.1152" y2="75.946" width="0.254" layer="16"/>
<wire x1="51.5112" y1="71.9836" x2="55.4736" y2="75.946" width="0.254" layer="16"/>
<wire x1="50.8508" y1="71.9836" x2="51.5112" y2="71.9836" width="0.254" layer="16"/>
<wire x1="58.1152" y1="75.946" x2="58.42" y2="76.2" width="0.254" layer="16"/>
<wire x1="50.8508" y1="71.9836" x2="50.8" y2="71.755" width="0.254" layer="16"/>
<wire x1="27.8384" y1="75.7936" x2="27.8384" y2="77.216" width="0.254" layer="16"/>
<wire x1="33.3248" y1="70.3072" x2="27.8384" y2="75.7936" width="0.254" layer="16"/>
<wire x1="48.1584" y1="70.3072" x2="33.3248" y2="70.3072" width="0.254" layer="16"/>
<wire x1="49.5808" y1="71.7296" x2="48.1584" y2="70.3072" width="0.254" layer="16"/>
<wire x1="50.8" y1="71.7296" x2="49.5808" y2="71.7296" width="0.254" layer="16"/>
<wire x1="27.8384" y1="77.216" x2="27.686" y2="77.216" width="0.254" layer="16"/>
<wire x1="50.8" y1="71.7296" x2="50.8" y2="71.755" width="0.254" layer="16"/>
</signal>
<signal name="LV3">
<contactref element="JP1" pad="2"/>
<contactref element="Q4" pad="2"/>
<contactref element="R1" pad="P$2"/>
<contactref element="LED3" pad="A"/>
<wire x1="61.087" y1="33.02" x2="60.96" y2="33.02" width="0.254" layer="1"/>
<wire x1="55.88" y1="61.7728" x2="50.8" y2="61.7728" width="0.254" layer="1"/>
<wire x1="59.7408" y1="65.6336" x2="55.88" y2="61.7728" width="0.254" layer="1"/>
<wire x1="59.7408" y1="66.4464" x2="59.7408" y2="65.6336" width="0.254" layer="1"/>
<wire x1="53.0352" y1="73.152" x2="59.7408" y2="66.4464" width="0.254" layer="1"/>
<wire x1="46.3296" y1="73.152" x2="53.0352" y2="73.152" width="0.254" layer="1"/>
<wire x1="45.72" y1="72.5424" x2="46.3296" y2="73.152" width="0.254" layer="1"/>
<wire x1="50.8" y1="61.7728" x2="50.8" y2="61.595" width="0.254" layer="1"/>
<wire x1="45.72" y1="72.5424" x2="45.72" y2="72.39" width="0.254" layer="1"/>
<wire x1="30.8864" y1="77.216" x2="30.226" y2="77.216" width="0.254" layer="16"/>
<wire x1="32.1056" y1="78.4352" x2="30.8864" y2="77.216" width="0.254" layer="16"/>
<wire x1="41.0464" y1="78.4352" x2="32.1056" y2="78.4352" width="0.254" layer="16"/>
<wire x1="45.72" y1="73.7616" x2="41.0464" y2="78.4352" width="0.254" layer="16"/>
<wire x1="45.72" y1="72.39" x2="45.72" y2="73.7616" width="0.254" layer="16"/>
<wire x1="60.96" y1="36.3728" x2="60.96" y2="33.02" width="0.254" layer="16"/>
<wire x1="55.6768" y1="41.656" x2="60.96" y2="36.3728" width="0.254" layer="16"/>
<wire x1="55.6768" y1="48.768" x2="55.6768" y2="41.656" width="0.254" layer="16"/>
<wire x1="55.6768" y1="51.816" x2="55.6768" y2="48.768" width="0.254" layer="1"/>
<wire x1="48.1584" y1="59.3344" x2="55.6768" y2="51.816" width="0.254" layer="1"/>
<wire x1="48.1584" y1="60.1472" x2="48.1584" y2="59.3344" width="0.254" layer="1"/>
<wire x1="49.5808" y1="61.5696" x2="48.1584" y2="60.1472" width="0.254" layer="1"/>
<wire x1="50.8" y1="61.5696" x2="49.5808" y2="61.5696" width="0.254" layer="1"/>
<wire x1="50.8" y1="61.5696" x2="50.8" y2="61.595" width="0.254" layer="1"/>
<via x="55.6768" y="48.768" extent="1-16" drill="0.381"/>
</signal>
<signal name="HV3">
<contactref element="JP2" pad="5"/>
<contactref element="Q4" pad="1"/>
<contactref element="R5" pad="P$2"/>
<contactref element="R11" pad="P$1"/>
<wire x1="50.1904" y1="59.436" x2="49.53" y2="59.436" width="0.254" layer="1"/>
<wire x1="51.5112" y1="58.1152" x2="50.1904" y2="59.436" width="0.254" layer="1"/>
<wire x1="56.4642" y1="58.1152" x2="51.5112" y2="58.1152" width="0.254" layer="1"/>
<wire x1="60.7568" y1="62.4078" x2="56.4642" y2="58.1152" width="0.254" layer="1"/>
<wire x1="60.7568" y1="64.7192" x2="60.7568" y2="62.4078" width="0.254" layer="1"/>
<wire x1="62.0776" y1="66.04" x2="60.7568" y2="64.7192" width="0.254" layer="1"/>
<wire x1="49.53" y1="59.436" x2="49.53" y2="59.69" width="0.254" layer="1"/>
<wire x1="62.0776" y1="66.04" x2="62.23" y2="66.04" width="0.254" layer="1"/>
<wire x1="22.7838" y1="67.0306" x2="22.7838" y2="68.3514" width="0.254" layer="16"/>
<wire x1="21.1328" y1="65.3796" x2="22.7838" y2="67.0306" width="0.254" layer="16"/>
<wire x1="21.1328" y1="64.389" x2="21.1328" y2="65.3796" width="0.254" layer="16"/>
<wire x1="22.7838" y1="62.738" x2="21.1328" y2="64.389" width="0.254" layer="16"/>
<wire x1="46.5582" y1="62.738" x2="22.7838" y2="62.738" width="0.254" layer="16"/>
<wire x1="49.53" y1="59.7662" x2="46.5582" y2="62.738" width="0.254" layer="16"/>
<wire x1="22.7838" y1="68.3514" x2="22.86" y2="68.58" width="0.254" layer="16"/>
<wire x1="49.53" y1="59.7662" x2="49.53" y2="59.69" width="0.254" layer="16"/>
<wire x1="46.1264" y1="24.9936" x2="46.1264" y2="19.304" width="0.254" layer="1"/>
<wire x1="60.5536" y1="39.4208" x2="46.1264" y2="24.9936" width="0.254" layer="1"/>
<wire x1="61.5696" y1="39.4208" x2="60.5536" y2="39.4208" width="0.254" layer="1"/>
<wire x1="62.1792" y1="40.0304" x2="61.5696" y2="39.4208" width="0.254" layer="1"/>
<wire x1="62.1792" y1="42.672" x2="62.1792" y2="40.0304" width="0.254" layer="1"/>
<wire x1="56.4896" y1="48.3616" x2="62.1792" y2="42.672" width="0.254" layer="1"/>
<wire x1="56.4896" y1="58.1152" x2="56.4896" y2="48.3616" width="0.254" layer="1"/>
<wire x1="46.1264" y1="19.304" x2="45.974" y2="19.304" width="0.254" layer="1"/>
<wire x1="56.4896" y1="58.1152" x2="56.4642" y2="58.1152" width="0.254" layer="1"/>
</signal>
<signal name="HV4">
<contactref element="Q2" pad="1"/>
<contactref element="R7" pad="P$2"/>
<contactref element="JP2" pad="6"/>
<contactref element="R12" pad="P$1"/>
<wire x1="50.8508" y1="68.3514" x2="49.53" y2="69.6722" width="0.254" layer="16"/>
<wire x1="53.8226" y1="68.3514" x2="50.8508" y2="68.3514" width="0.254" layer="16"/>
<wire x1="58.4454" y1="63.7286" x2="53.8226" y2="68.3514" width="0.254" layer="16"/>
<wire x1="60.7568" y1="63.7286" x2="58.4454" y2="63.7286" width="0.254" layer="16"/>
<wire x1="62.0776" y1="62.4078" x2="60.7568" y2="63.7286" width="0.254" layer="16"/>
<wire x1="49.53" y1="69.6722" x2="49.53" y2="69.85" width="0.254" layer="16"/>
<wire x1="62.0776" y1="62.4078" x2="62.23" y2="62.23" width="0.254" layer="16"/>
<wire x1="39.4208" y1="19.304" x2="43.434" y2="19.304" width="0.254" layer="16"/>
<wire x1="37.3888" y1="17.272" x2="39.4208" y2="19.304" width="0.254" layer="16"/>
<wire x1="24.1808" y1="17.272" x2="37.3888" y2="17.272" width="0.254" layer="16"/>
<wire x1="20.7264" y1="20.7264" x2="24.1808" y2="17.272" width="0.254" layer="16"/>
<wire x1="20.7264" y1="70.3072" x2="20.7264" y2="20.7264" width="0.254" layer="16"/>
<wire x1="22.7584" y1="72.3392" x2="20.7264" y2="70.3072" width="0.254" layer="16"/>
<wire x1="22.7584" y1="72.3392" x2="22.86" y2="72.39" width="0.254" layer="16"/>
<wire x1="25.4" y1="69.9008" x2="49.3776" y2="69.9008" width="0.254" layer="16"/>
<wire x1="22.9616" y1="72.3392" x2="25.4" y2="69.9008" width="0.254" layer="16"/>
<wire x1="49.3776" y1="69.9008" x2="49.53" y2="69.85" width="0.254" layer="16"/>
<wire x1="22.9616" y1="72.3392" x2="22.86" y2="72.39" width="0.254" layer="16"/>
</signal>
<signal name="SWITCH">
<contactref element="K1" pad="MAIN"/>
<contactref element="JP4" pad="5"/>
<wire x1="26.924" y1="20.8788" x2="26.8224" y2="19.1008" width="1.778" layer="1"/>
<wire x1="33.1216" y1="23.7744" x2="26.924" y2="20.8788" width="1.778" layer="1"/>
<wire x1="38.5572" y1="23.7744" x2="33.1216" y2="23.7744" width="1.778" layer="1"/>
<wire x1="50.8" y1="36.7792" x2="38.5572" y2="23.7744" width="1.778" layer="1"/>
<wire x1="26.8224" y1="19.1008" x2="26.67" y2="19.05" width="0.254" layer="1"/>
<wire x1="50.8" y1="36.7792" x2="50.8" y2="36.83" width="0.254" layer="1"/>
</signal>
<signal name="N$4">
<contactref element="K1" pad="COIL2"/>
<contactref element="ZEN-" pad="1"/>
<contactref element="Q5" pad="1"/>
<wire x1="25.0952" y1="41.9354" x2="25.0952" y2="39.624" width="0.254" layer="1"/>
<wire x1="27.0764" y1="43.9166" x2="25.0952" y2="41.9354" width="0.254" layer="1"/>
<wire x1="31.0388" y1="43.9166" x2="27.0764" y2="43.9166" width="0.254" layer="1"/>
<wire x1="36.6522" y1="49.53" x2="35.6616" y2="48.5394" width="0.254" layer="1"/>
<wire x1="35.6616" y1="48.5394" x2="31.0388" y2="43.9166" width="0.254" layer="1"/>
<wire x1="25.0952" y1="39.624" x2="25.4" y2="39.37" width="0.254" layer="1"/>
<wire x1="36.6522" y1="49.53" x2="36.83" y2="49.53" width="0.254" layer="1"/>
<wire x1="35.3314" y1="48.5394" x2="26.7462" y2="57.1246" width="0.254" layer="1"/>
<wire x1="35.6616" y1="48.5394" x2="35.3314" y2="48.5394" width="0.254" layer="1"/>
<wire x1="26.7462" y1="57.1246" x2="26.67" y2="57.15" width="0.254" layer="1"/>
</signal>
<signal name="N$1">
<contactref element="DIO+" pad="1"/>
<contactref element="ZEN+" pad="1"/>
<wire x1="26.7462" y1="53.1622" x2="26.7462" y2="49.53" width="0.254" layer="1"/>
<wire x1="26.7462" y1="49.53" x2="26.67" y2="49.53" width="0.254" layer="1"/>
<wire x1="26.7462" y1="53.1622" x2="26.67" y2="53.34" width="0.254" layer="1"/>
</signal>
<signal name="N$3">
<contactref element="LED2" pad="K"/>
<contactref element="R14" pad="P$1"/>
<wire x1="60.96" y1="38.1" x2="64.008" y2="38.1" width="0.3048" layer="1"/>
<wire x1="64.008" y1="38.1" x2="64.77" y2="38.862" width="0.3048" layer="1"/>
<wire x1="64.77" y1="38.862" x2="64.77" y2="46.99" width="0.3048" layer="1"/>
<wire x1="64.77" y1="46.99" x2="66.548" y2="48.768" width="0.3048" layer="1"/>
<wire x1="66.548" y1="48.768" x2="66.548" y2="54.356" width="0.3048" layer="1"/>
</signal>
<signal name="N$2">
<contactref element="LED4" pad="K"/>
<contactref element="R16" pad="P$1"/>
<wire x1="66.548" y1="17.78" x2="60.96" y2="17.78" width="0.4064" layer="1"/>
<wire x1="60.96" y1="17.78" x2="60.96" y2="22.86" width="0.4064" layer="1"/>
</signal>
<signal name="N$5">
<contactref element="LED1" pad="K"/>
<contactref element="R13" pad="P$1"/>
<wire x1="64.516" y1="66.04" x2="66.04" y2="67.564" width="0.4064" layer="1"/>
<wire x1="66.04" y1="67.564" x2="66.548" y2="67.564" width="0.4064" layer="1"/>
<wire x1="60.96" y1="45.72" x2="64.516" y2="49.276" width="0.3048" layer="1"/>
<wire x1="64.516" y1="49.276" x2="64.516" y2="66.04" width="0.3048" layer="1"/>
</signal>
<signal name="N$6">
<contactref element="LED3" pad="K"/>
<contactref element="R15" pad="P$1"/>
<wire x1="60.96" y1="30.48" x2="61.468" y2="30.988" width="0.4064" layer="1"/>
<wire x1="61.468" y1="30.988" x2="66.548" y2="30.988" width="0.4064" layer="1"/>
</signal>
<signal name="N$8">
<contactref element="R16" pad="P$2"/>
<contactref element="R15" pad="P$2"/>
<contactref element="R14" pad="P$2"/>
<contactref element="R13" pad="P$2"/>
<contactref element="JP3" pad="1"/>
<wire x1="66.294" y1="73.406" x2="66.548" y2="73.152" width="0.4064" layer="1"/>
<wire x1="66.548" y1="73.152" x2="68.072" y2="73.152" width="0.4064" layer="1"/>
<wire x1="68.072" y1="73.152" x2="68.072" y2="57.404" width="0.4064" layer="1"/>
<wire x1="68.072" y1="57.404" x2="68.072" y2="44.196" width="0.4064" layer="1"/>
<wire x1="68.072" y1="44.196" x2="68.072" y2="41.148" width="0.4064" layer="1"/>
<wire x1="68.072" y1="41.148" x2="68.072" y2="27.94" width="0.4064" layer="1"/>
<wire x1="68.072" y1="27.94" x2="66.548" y2="27.94" width="0.4064" layer="1"/>
<wire x1="66.548" y1="57.404" x2="68.072" y2="57.404" width="0.4064" layer="1"/>
<wire x1="66.548" y1="44.196" x2="68.072" y2="44.196" width="0.4064" layer="1"/>
<wire x1="66.548" y1="41.148" x2="68.072" y2="41.148" width="0.4064" layer="1"/>
</signal>
</signals>
</board>
</drawing>
<compatibility>
<note version="6.3" minversion="6.2.2" severity="warning">
Since Version 6.2.2 text objects can contain more than one line,
which will not be processed correctly with this version.
</note>
</compatibility>
</eagle>


text:
using UnityEngine;
using WhateverDevs.DefaultToolBarButtons.Editor;

namespace Editor
{
    [CreateAssetMenu(menuName = "Test/PlayHook", fileName = "TestPlayHook")]
    public class TestPlayHook : PlayHook
    {
        // This is very stupid because the console usually clears on play but works as an example.
        public override void Run() => Logger.Info("Running before play.");
    }
}

license: MIT

repository: WhateverDevs/CoreDev

license_type: permissive

repo_name: WhateverDevs/CoreDev

branch_name: refs/heads/master

extension: cs


text:
package cmd

import (
	"fmt"

	"github.com/spf13/cobra"
)

var (
	jsonConfig bool
	yamlConfig bool
)

var yamlDefault = []byte(`
loglevel: INFO
`)

var jsonDefault = []byte(`{
	"loglevel": "INFO"
}`)

// defaultsCmd represents the defaults command
var defaultsCmd = &cobra.Command{
	Use:   "defaults",
	Short: "Prints default fxtrigger configuration file",
	Long: `Use this to create a default configuration file for fxtrigger.
	Example:
	fxtrigger defaults > fxtrigger.yaml`,
	Run: func(cmd *cobra.Command, args []string) {
		if jsonConfig {
			fmt.Printf("%s", jsonDefault)
		} else if yamlConfig {
			fmt.Printf("%s", yamlDefault)
		}
	},
}

func init() {
	rootCmd.AddCommand(defaultsCmd)

	defaultsCmd.Flags().BoolVarP(&jsonConfig, "json", "j", false, "Create a JSON configuration file")
	defaultsCmd.Flags().BoolVarP(&yamlConfig, "yaml", "y", true, "Create a YAML configuration file")
}

repository: danesparza/fxtrigger

repo_name: danesparza/fxtrigger

branch_name: refs/heads/main

extension: go


text:
package main

// This file adds the Disgord message route multiplexer, aka "command router".
// to the Disgord bot. This is an optional addition however it is included
// by default to demonstrate how to extend the Disgord bot.

import (
	"github.com/henesy/glenda/x/mux"
)

// Router is registered as a global variable to allow easy access to the
// multiplexer throughout the bot.
var Router = mux.New()

func init() {
	// Register the mux OnMessageCreate handler that listens for and processes
	// all messages received.
	Session.AddHandler(Router.OnMessageCreate)

	// Register the build-in help command.
	Router.Route("help", "Display this message.", Router.Help)

	Router.Route("about", "General information about the bot.", Router.About)

	Router.Route("newuser", "Information for new users of Plan 9.", Router.Newuser)

	Router.Route("invite", "Generate a single use invite", Router.Invite)

	Router.Route("remindme", "Set a reminder for a given time interval ([int][hmsd] [reminder]).", Router.RemindMe)

	Router.Route("man", "Link a given Plan 9 manual page (From 9front for now).", Router.Man)

	Router.Route("lookman", "Search for a string in the Plan 9 manual pages (From 9front for now).", Router.Lookman)

	Router.Route("sig", "Search for function definitions in the Plan 9 manual pages (From 9front for now).", Router.Sig)

	Router.Route("fortune", "Display fortunes. Bonus files are (theo troll rsc terry rob ken henesy davros).", Router.Fortunes)

	Router.Route("bullshit", "Print logical statements with sound grounding.", Router.Bullshit)

	Router.Route("add", "Track an RSS feed.", Router.Add)

	Router.Route("remove", "Remove a tracked RSS feed by ID.", Router.Remove)

	Router.Route("list", "List RSS feeds Glenda is subscribed to by id.", Router.List)

	Router.Route("last", "Show the last commit for a given RSS feed by id.", Router.Last)

	Router.Route("dump", "Dump config to file.", Router.Dump)

	Router.Route("mkindex", "Generate index for lookman from mirror.", Router.Mkindex)

	Router.Route("subscribe", "Subscribe current channel to a given feed id.", Router.Subscribe)

	Router.Route("unsubscribe", "Unsubscribe current channel to a given feed id.", Router.Unsubscribe)

	Router.Route("beer", ":beer:", Router.Beer)

	Router.Route("whiskey", ":tumbler_glass:", Router.Whiskey)

	Router.Route("wine", ":wine_glass:", Router.Wine)

	Router.Route("uptime", "Current bot uptime", Router.Uptime)

	Router.Route("gridlink", "Convert griddisk paths to incoming URLs", Router.GridLink)

	Router.Route("roll", "Roll dice in the form XdY", Router.Roll)

	Router.Route("oracle", "Display oracle readings. Files are (papers fortunes fqa faust pooh).", Router.Oracle)
}

repository: henesy/glenda

repo_name: henesy/glenda

gha_language: Go


text:
// Copyright (c) bwplotka/mimic Authors
// Licensed under the Apache License 2.0.

package main

import (
	"fmt"
	"io"
	"path"

	"github.com/prometheus/common/model"

	"github.com/bwplotka/mimic/examples/prometheus-rem-read-benchmark/abstr/kubernetes/volumes"
	"github.com/bwplotka/mimic/examples/prometheus-rem-read-benchmark/schemas/prometheus"
	"github.com/go-openapi/swag"
	appsv1 "k8s.io/api/apps/v1"
	corev1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/api/resource"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

	"k8s.io/apimachinery/pkg/util/intstr"

	"github.com/bwplotka/mimic"
	"github.com/bwplotka/mimic/encoding"
)

const (
	selectorName = "app"
)

/*

Test procedure:

* Generate YAMLs from definitions:
  * `go run github.com/bwplotka/mimic/projects/prom-remote-read-bench generate`

* Apply baseline:
  * `kubectl apply -f gen/prom-rr-test.yaml`

* Forward gRPC sidecar port:
  * `kubectl port-forward pod/prom-rr-test-0 1234:19090`

* Perform tests using test.sh (modifying parameters in script itself - heavy queries!)
  * This performs heavy queries against Thanos gRPC Store.Series of sidecar which will proxy
requests as remote read to Prometheus
  * `bash ./projects/prom-remote-read-bench/test.sh localhost:1234`

*/

func main() {
	generator := mimic.New()

	// Make sure to generate at the very end.
	defer generator.Generate()

	// Generate resources for remote read tests.

	// Baseline.
	genRRTestPrometheus(
		generator,
		"prom-rr-test",
		"v2.11.0-rc.0-clear",
		"v0.5.0",
	)

	// Streamed.
	genRRTestPrometheus(
		generator,
		"prom-rr-test-streamed",
		"v2.11.0-rc.0-rr-streaming",
		"v0.5.0-rr-streamed2",
	)
}

func genRRTestPrometheus(generator *mimic.Generator, name string, promVersion string, thanosVersion string) {
	const (
		replicas = 1

		configVolumeName  = "prometheus-config"
		configVolumeMount = "/etc/prometheus"
		sharedDataPath    = "/data-shared"

		namespace = "rr-test"

		httpPort        = 9090
		httpSidecarPort = 19190
		grpcSidecarPort = 19090
		blockgenImage   = "improbable/blockgen:master-894c9481c4"
		// Generate 10k series.
		blockgenInput = `[{
  "type": "gauge",
  "jitter": 20,
  "max": 200000000,
  "min": 100000000,
  "result": {"multiplier":10000,"resultType":"vector","result":[{"metric":{"__name__":"kube_pod_container_resource_limits_memory_bytes","cluster":"eu1","container":"addon-resizer","instance":"172.17.0.9:8080","job":"kube-state-metrics","namespace":"kube-system","node":"minikube","pod":"kube-state-metrics-68f6cc566c-vp566"}}]}
}]`
	)
	var (
		promDataPath    = path.Join(sharedDataPath, "prometheus")
		prometheusImage = fmt.Sprintf("bplotka/prometheus:%s", promVersion)
		thanosImage     = fmt.Sprintf("improbable/thanos:%s", thanosVersion)
	)

	// Empty configuration, we don't need any scrape.
	cfgBytes, err := io.ReadAll(encoding.YAML(prometheus.Config{
		GlobalConfig: prometheus.GlobalConfig{
			ExternalLabels: map[model.LabelName]model.LabelValue{
				"replica": "0",
			},
		},
	}))
	mimic.PanicOnErr(err)

	promConfigAndMount := volumes.ConfigAndMount{
		ObjectMeta: metav1.ObjectMeta{
			Name:      configVolumeName,
			Namespace: namespace,
			Labels: map[string]string{
				selectorName: name,
			},
		},
		VolumeMount: corev1.VolumeMount{
			Name:      configVolumeName,
			MountPath: configVolumeMount,
		},
		Data: map[string]string{
			"prometheus.yaml": string(cfgBytes),
		},
	}

	sharedVM := volumes.VolumeAndMount{
		VolumeMount: corev1.VolumeMount{
			Name:      name,
			MountPath: sharedDataPath,
		},
	}

	srv := corev1.Service{
		TypeMeta: metav1.TypeMeta{
			Kind:       "Service",
			APIVersion: "v1",
		},
		ObjectMeta: metav1.ObjectMeta{
			Name:      name,
			Namespace: namespace,
			Labels: map[string]string{
				selectorName: name,
			},
		},
		Spec: corev1.ServiceSpec{
			Type:      corev1.ServiceTypeClusterIP,
			ClusterIP: "None",
			Selector: map[string]string{
				selectorName: name,
			},
			Ports: []corev1.ServicePort{
				{
					Name:       "http",
					Port:       httpPort,
					TargetPort: intstr.FromInt(httpPort),
				},
				{
					Name:       "grpc-sidecar",
					Port:       grpcSidecarPort,
					TargetPort: intstr.FromInt(grpcSidecarPort),
				},
				{
					Name:       "http-sidecar",
					Port:       httpSidecarPort,
					TargetPort: intstr.FromInt(httpSidecarPort),
				},
			},
		},
	}

	blockgenInitContainer := corev1.Container{
		Name:    "blockgen",
		Image:   blockgenImage,
		Command: []string{"/bin/blockgen"},
		Args: []string{
			"synthetic",
			fmt.Sprintf("--input=%s", blockgenInput),
			fmt.Sprintf("--output-dir=%s", promDataPath),
			"--retention=24h",
		},
		VolumeMounts: []corev1.VolumeMount{sharedVM.VolumeMount},
		Resources: corev1.ResourceRequirements{
			Requests: corev1.ResourceList{
				corev1.ResourceCPU:    resource.MustParse("1"),
				corev1.ResourceMemory: resource.MustParse("10Gi"),
			},
			Limits: corev1.ResourceList{
				corev1.ResourceCPU:    resource.MustParse("1"),
				corev1.ResourceMemory: resource.MustParse("10Gi"),
			},
		},
	}

	prometheusContainer := corev1.Container{
		Name:  "prometheus",
		Image: prometheusImage,
		Args: []string{
			fmt.Sprintf("--config.file=%v/prometheus.yaml", configVolumeMount),
			"--log.level=info",
			// Unlimited RR.
			"--storage.remote.read-concurrent-limit=99999",
			"--storage.remote.read-sample-limit=9999999999999999",
			fmt.Sprintf("--storage.tsdb.path=%s", promDataPath),
			"--storage.tsdb.min-block-duration=2h",
			// Avoid compaction for less moving parts in results.
			"--storage.tsdb.max-block-duration=2h",
			"--storage.tsdb.retention.time=2d",
			"--web.enable-lifecycle",
			"--web.enable-admin-api",
		},
		Env: []corev1.EnvVar{
			{Name: "HOSTNAME", ValueFrom: &corev1.EnvVarSource{
				FieldRef: &corev1.ObjectFieldSelector{
					FieldPath: "metadata.name",
				},
			}},
			//{Name: "GODEBUG", Value:"madvdontneed=1"},
		},
		ImagePullPolicy: corev1.PullAlways,
		ReadinessProbe: &corev1.Probe{
			Handler: corev1.Handler{
				HTTPGet: &corev1.HTTPGetAction{
					Port: intstr.FromInt(int(httpPort)),
					Path: "-/ready",
				},
			},
			SuccessThreshold: 3,
		},
		Ports: []corev1.ContainerPort{
			{
				Name:          "http",
				ContainerPort: httpPort,
			},
		},
		VolumeMounts: volumes.VolumesAndMounts{promConfigAndMount.VolumeAndMount(), sharedVM}.VolumeMounts(),
		SecurityContext: &corev1.SecurityContext{
			RunAsNonRoot: swag.Bool(false),
			RunAsUser:    swag.Int64(1000),
		},
		Resources: corev1.ResourceRequirements{
			Requests: corev1.ResourceList{
				corev1.ResourceCPU:    resource.MustParse("1"),
				corev1.ResourceMemory: resource.MustParse("10Gi"),
			},
			Limits: corev1.ResourceList{
				corev1.ResourceCPU:    resource.MustParse("1"),
				corev1.ResourceMemory: resource.MustParse("10Gi"),
			},
		},
	}

	thanosSidecarContainer := corev1.Container{
		Name:            "thanos",
		Image:           thanosImage,
		Command:         []string{"thanos"},
		ImagePullPolicy: corev1.PullAlways,
		Args: []string{
			"sidecar",
			"--log.level=debug",
			"--debug.name=$(POD_NAME)",
			fmt.Sprintf("--http-address=0.0.0.0:%d", httpSidecarPort),
			fmt.Sprintf("--grpc-address=0.0.0.0:%d", grpcSidecarPort),
			fmt.Sprintf("--prometheus.url=http://localhost:%d", httpPort),
			fmt.Sprintf("--tsdb.path=%s", promDataPath),
		},
		Env: []corev1.EnvVar{
			{Name: "POD_NAME", ValueFrom: &corev1.EnvVarSource{
				FieldRef: &corev1.ObjectFieldSelector{
					FieldPath: "metadata.name",
				},
			}},
			//{Name: "GODEBUG", Value:"madvdontneed=1"},
		},
		Ports: []corev1.ContainerPort{
			{
				Name:          "m-sidecar",
				ContainerPort: httpSidecarPort,
			},
			{
				Name:          "grpc-sidecar",
				ContainerPort: grpcSidecarPort,
			},
		},
		ReadinessProbe: &corev1.Probe{
			Handler: corev1.Handler{
				HTTPGet: &corev1.HTTPGetAction{
					Port: intstr.FromInt(int(httpSidecarPort)),
					Path: "metrics",
				},
			},
		},
		VolumeMounts: volumes.VolumesAndMounts{sharedVM}.VolumeMounts(),
		Resources: corev1.ResourceRequirements{
			Requests: corev1.ResourceList{
				corev1.ResourceCPU:    resource.MustParse("1"),
				corev1.ResourceMemory: resource.MustParse("4Gi"),
			},
			Limits: corev1.ResourceList{
				corev1.ResourceCPU:    resource.MustParse("1"),
				corev1.ResourceMemory: resource.MustParse("4Gi"),
			},
		},
	}

	set := appsv1.StatefulSet{
		TypeMeta: metav1.TypeMeta{
			Kind:       "StatefulSet",
			APIVersion: "apps/v1",
		},
		ObjectMeta: metav1.ObjectMeta{
			Name:      name,
			Namespace: namespace,
			Labels: map[string]string{
				selectorName: name,
			},
		},
		Spec: appsv1.StatefulSetSpec{
			Replicas:    swag.Int32(replicas),
			ServiceName: name,
			Template: corev1.PodTemplateSpec{
				ObjectMeta: metav1.ObjectMeta{
					Labels: map[string]string{
						selectorName: name,
						"version":    fmt.Sprintf("prometheus%s_thanos%s", promVersion, thanosVersion),
					},
				},
				Spec: corev1.PodSpec{
					InitContainers: []corev1.Container{blockgenInitContainer},
					Containers:     []corev1.Container{prometheusContainer, thanosSidecarContainer},
					Volumes:        volumes.VolumesAndMounts{promConfigAndMount.VolumeAndMount(), sharedVM}.Volumes(),
				},
			},
			Selector: &metav1.LabelSelector{
				MatchLabels: map[string]string{
					selectorName: name,
				},
			},
		},
	}

	generator.Add(name+".yaml", encoding.GhodssYAML(set, srv, promConfigAndMount.ConfigMap()))
}

repository: bwplotka/mimic

repo_name: bwplotka/mimic


text:
# Everything but the kitchen sink with regards to dev-tools, poured into the
# target environment...

# Grab the baseline...
require pha-base-image.bb

IMAGE_INSTALL += " \
	packagegroup-core-buildessential \
	packagegroup-core-sdk \
	packagegroup-core-standalone-sdk-target \
	packagegroup-core-tools-debug \
	packagegroup-core-tools-profile \
	packagegroup-core-tools-testapps \
	packagegroup-sdk-target \
	kernel-devsrc \
	glibc-dev \
	sudo \
	go \
	packagegroup-go-sdk-target \
	go-helloworld \
	"

extension: bb


text:
# Copyright 2020 by Cliff Green
#
# https://github.com/connectivecpp/utility-rack
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

set ( test_source_dir "${CMAKE_SOURCE_DIR}/test" )
set ( test_main_src "${test_source_dir}/main_test.cpp" )
set ( tester_suffix "_runner" )
set ( main_test_lib_name "main_test_lib" )

# end of file

repository: connectivecpp/utility-rack

repo_name: connectivecpp/utility-rack

extension: cmake


text:
#include <badem/node/json_payment_observer.hpp>
#include <badem/node/payment_observer_processor.hpp>

badem::payment_observer_processor::payment_observer_processor (badem::node_observers::blocks_t & blocks)
{
	blocks.add ([this](badem::election_status const &, badem::account const & account_a, badem::uint128_t const &, bool) {
		observer_action (account_a);
	});
}

void badem::payment_observer_processor::observer_action (badem::account const & account_a)
{
	std::shared_ptr<badem::json_payment_observer> observer;
	{
		badem::lock_guard<std::mutex> lock (mutex);
		auto existing (payment_observers.find (account_a));
		if (existing != payment_observers.end ())
		{
			observer = existing->second;
		}
	}
	if (observer != nullptr)
	{
		observer->observe ();
	}
}

void badem::payment_observer_processor::add (badem::account const & account_a, std::shared_ptr<badem::json_payment_observer> payment_observer_a)
{
	badem::lock_guard<std::mutex> lock (mutex);
	assert (payment_observers.find (account_a) == payment_observers.end ());
	payment_observers[account_a] = payment_observer_a;
}

void badem::payment_observer_processor::erase (badem::account & account_a)
{
	badem::lock_guard<std::mutex> lock (mutex);
	assert (payment_observers.find (account_a) != payment_observers.end ());
	payment_observers.erase (account_a);
}

repository: bademcurrency/badem-node

repo_name: bademcurrency/badem-node

extension: cpp


text:
/* Copyright 2021 Google LLC
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 "fuzz.h"

extern "C" {
#include <sys/time.h>
#include "config.h"
#include "syshead.h"
#include "proxy.h"
#include "interval.h"
#include <openssl/err.h>
#include <openssl/ssl.h>
}

extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
{
    CRYPTO_malloc_init();
    SSL_library_init();
    ERR_load_crypto_strings();

    OpenSSL_add_all_algorithms();
    OpenSSL_add_ssl_algorithms();
    OpenSSL_add_all_digests();

    SSL_load_error_strings();
    return 1;
}

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
	char *tmp = NULL;
  char *tmp2 = NULL;

  if (size < 500) {
    return 0;
  }
  FuzzedDataProvider provider(data, size);
  prov = &provider;

  struct gc_arena gc = gc_new();
  struct http_proxy_info pi;
  ssize_t generic_ssizet;
  int signal_received = 0;
  struct buffer lookahead = alloc_buf(1024);
  struct event_timeout evt;

  memset(&evt, 0, sizeof(struct event_timeout));
  memset(&pi, 0, sizeof(struct http_proxy_info));
  memset(&pi, 0, sizeof(pi));

  generic_ssizet = 0;
  std::string username = provider.ConsumeBytesAsString(
      (provider.ConsumeIntegralInRange<uint32_t>(1, USER_PASS_LEN)));
  strcpy(pi.up.username, username.c_str());
  if (strlen(pi.up.username) == 0) {
    gc_free(&gc);
    free_buf(&lookahead);
    return 0;
  }

  std::string pass = provider.ConsumeBytesAsString(
      (provider.ConsumeIntegralInRange<uint32_t>(1, USER_PASS_LEN)));
  strcpy(pi.up.password, pass.c_str());
  if (strlen(pi.up.password) == 0) {
    gc_free(&gc);
    free_buf(&lookahead);
    return 0;
  }

  generic_ssizet = provider.ConsumeIntegralInRange(0, 4);
  switch (generic_ssizet) {
  case 0:
    pi.auth_method = HTTP_AUTH_NONE;
    break;
  case 1:
     pi.auth_method = HTTP_AUTH_BASIC;
    break;
  case 2:
    pi.auth_method = HTTP_AUTH_DIGEST;
    break;
  case 3:
    pi.auth_method = HTTP_AUTH_NTLM;
    break;
  case 4:
    pi.auth_method = HTTP_AUTH_NTLM2;
    break;
  }
  pi.options.http_version = "1.1";

  generic_ssizet = provider.ConsumeIntegralInRange(0, 4);
  switch (generic_ssizet) {
  case 0:
    pi.options.auth_retry = PAR_NO;
    break;
  case 1:
    pi.options.auth_retry = PAR_ALL;
    break;
  case 2:
    pi.options.auth_retry = PAR_NCT;
    break;
  }

  char *tmp_authenticate = get_modifiable_string(provider);
  pi.proxy_authenticate = tmp_authenticate;

  if (provider.ConsumeProbability<double>() < 0.5) {

    tmp = get_modifiable_string(provider);
    pi.options.custom_headers[0].name = tmp;
    if (provider.ConsumeProbability<double>() < 0.5) {
      tmp2 = get_modifiable_string(provider);
      pi.options.custom_headers[0].content = tmp2;
    }
  }

  establish_http_proxy_passthru(&pi, 0, "1.2.3.4", "777", &evt, &lookahead,
                                &signal_received);
  free(pi.proxy_authenticate);
  gc_free(&gc);
  free_buf(&lookahead);

  if (tmp != NULL)  free(tmp);
  if (tmp2 != NULL) free(tmp2);
  return 0;
}

repository: VinayaSathyanarayana/oss-fuzz

repo_name: VinayaSathyanarayana/oss-fuzz