#!/bin/sh
# Compile and assemble the test cases in the current working directory

GCC="$1"
echo $GCC
for i in *.c; do
  if egrep '__label__|&&' > /dev/null $i; then true; else
    echo -n $i" "
    echo -n 0
    $GCC $i -S -w -o /dev/null
    echo -n 1
    $GCC $i -O -S -w -o /dev/null
    echo -n 2
    $GCC $i -O -S -fomit-frame-pointer -w -o /dev/null
    echo
  fi
done
