<?xml version="1.0" encoding="UTF-8"?>
<net name="Gain" type="iopt-flow">
  <signal id="K" x="135" y="150" mode="input" type="range" min="0" max="127" frac="0" value="0" dynamic="none" io_pin="0" microstep="0" nano-step="0"/>
  <signal id="V" x="135" y="210" mode="input" type="range" min="-8192" max="8191" frac="0" value="0" dynamic="none" io_pin="0" microstep="0" nano-step="0"/>
  <operation id="o3" x="240" y="210" rot="0" shape="arrow" size="16">
    <name off_x="-15" off_y="-15" text="AbsV"/>
    <input off_x="-16" off_y="0" name="V" id="o3.V" type="range" min="-8192" max="8191" dynamic="all" frac="0"/>
    <output off_x="16" off_y="0" name="out" id="o3.out" type="range" min="0" max="8192" dynamic="none" frac="0" microstep="0" nano-step="1">
      <expression>
        <operand type="signal" idRef="V"/>
        <operator type="when"/>
        <operand type="signal" idRef="V"/>
        <operator type="more-or-equal"/>
        <operand type="literal" value="0"/>
        <text>V WHEN (V &gt;= 0)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="V" sign="-1"/>
        <text>-V OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a4" type="read" source="V" target="o3.V"/>
  <operation id="o5" x="320" y="160" rot="0" shape="arrow" size="24">
    <name off_x="-20" off_y="-25" text="KAbsV"/>
    <input off_x="-24" off_y="-8" name="K" id="o5.K" type="range" min="0" max="127" dynamic="all" frac="0"/>
    <input off_x="-24" off_y="8" name="AbsV" id="o5.AbsV" type="range" min="0" max="8192" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="o5.out" type="range" min="0" max="65535" dynamic="none" frac="0" microstep="0" nano-step="2">
      <expression>
        <operand type="signal" idRef="K"/>
        <operator type="mul"/>
        <operand type="signal" idRef="AbsV"/>
        <text>K * AbsV</text>
      </expression>
    </output>
  </operation>
  <arc id="a6" type="read" source="o3.out" target="o5.AbsV"/>
  <arc id="a7" type="read" source="K" target="o5.K"/>
  <operation id="o8" x="430" y="170" rot="0" shape="arrow" size="24">
    <name off_x="-5" off_y="-25" text="KV"/>
    <input off_x="-24" off_y="-8" name="KAbsV" id="o8.KAbsV" type="range" min="0" max="65535" dynamic="all" frac="0"/>
    <input off_x="-24" off_y="8" name="V" id="o8.V" type="range" min="-8192" max="8191" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="o8.out" type="range" min="-65536" max="65535" dynamic="none" frac="0" microstep="0" nano-step="3">
      <expression>
        <operand type="signal" idRef="KAbsV"/>
        <operator type="when"/>
        <operand type="signal" idRef="V"/>
        <operator type="more-or-equal"/>
        <operand type="literal" value="0"/>
        <text>KAbsV WHEN (V &gt;= 0)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="KAbsV" sign="-1"/>
        <text>-KAbsV OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a9" type="read" source="V" target="o8.V" view="symbolic"/>
  <arc id="a11" type="read" source="o5.out" target="o8.KAbsV"/>
  <signal id="R" x="530" y="170" mode="output" type="range" min="-65536" max="65535" dynamic="type" frac="0" value="0" io_pin="0" microstep="0" nano-step="3"/>
  <arc id="a1" type="read" source="o8.out" target="R"/>
</net>
