Complete the following code so it obeys its comments:
Typedef struct list {
int val;
struct list *next;
} list;
/* Swaps values at the front of lists x and y */
void swap_heads(list *x, list *y) {
list tmp = {y->val, x}; // new list node
x = &tmp; y->val = x->next->val;
[1]
_________