How to convert this C program into ASM assembly language? [on hold]

How would you write this program in assembly language? I am pretty sure you only would need 3 registers but I don't think I completely know how to do it. help would be appreciated!

int t;
int array[2];

void swap() {
    t = array[0];
    array[0] = array[1];
    array[1] = t;

What you need is called a compiler.

Simply run it, and set the parameters to deliver assembler code (instead of an .o or an .exe)