Main.c and cards.s implementation