The GCC compiler changes the order of the operations such that the assignment happens after the print for x.
call __printf_chk@PLT mov ecx, DWORD PTR 0[rbp] mov rdx, rbp mov edi, 2 mov DWORD PTR -96[rbx], 7