#!/bin/bash
(
mode=$1
program=$2
cargo run --release -- $mode $program
if [ "$mode" == "c" ]; then
mv ./program.asm ./asm/program.asm \
&& nasm -felf64 ./asm/program.asm \
&& ld.lld ./asm/program.o -o ./asm/program \
&& ./asm/program
fi
)