Can anyone explain why output of following program excerpt gives value '6' for x ?

int x=8;
x-=--x-x--;//how this statement will be processed
printf("%d",x);