<?xml version="1.0" encoding="UTF-8"?>
<flow>
    <chain id="implB" extends="base2">
        {{3}}=THEN(a,b);
        {{4}}=j;
    </chain>

    <chain id="implC" extends="base2">
        {{3}}=THEN(a,b);
        {{4}}=THEN(a,b).id("j");
    </chain>

    <chain abstract="true" name="base">
        THEN(a, b, {{0}}, {{1}})
    </chain>

    <chain id="implA" extends="base">
        {{0}}=IF(c, d, e);
        {{1}}=SWITCH(f).to(j,k);
    </chain>

    <chain abstract="true" id="base2" extends="base">
        {{0}}=THEN(a,b,{{3}});
        {{1}}=SWITCH(f).to({{4}},k);
    </chain>

    <chain name="base3">
        THEN({{_pre}},{{mainChain}}, {{subChain1}},{{subChain2}},{{end_chain}})
    </chain>

    <chain extends="base3" id="implD">
        {{_pre}} = THEN(a,b);
        {{mainChain}}=THEN(a,b);
        {{subChain1}}=THEN(j,k);
        {{subChain2}}=IF(c, d, e);
        {{end_chain}}=SWITCH(f).to(j,k);
    </chain>


</flow>