I am trying to learn assembly language. I have searched and found how to disassemble a .c file but I think it produces some optimized version of the program. Is
.c
You can disable optimizations if you pass -O0 with the gcc command-line.
E.g. to turn a .C file into a .S file call:
gcc -O0 -S test.c