#!/bin/sh
set -e
# compute OLR from FSLO FLA FLG
if [ $# -ne 5 ] ; then
  echo "Error in $0: invalid number of arguments $#"
  exit 1
fi
pfx=$1
inp1=$2
inp2=$3
inp3=$4
out=$5
access inp1 ${pfx}_${inp1}
access inp2 ${pfx}_${inp2}
access inp3 ${pfx}_${inp3}
add inp1 inp2 inp1plus2
sub inp1plus2 inp3 ${pfx}_${out}
release inp1 inp2 inp3 inp1plus2
