Is the disassembly listing generated by a disassembler exactly the same as the assembly code listing that is optionally generated by a compiler during the compilation of C code?
No I'd expect that the compiler's assembly output can include symbolic names, of functions and of variables, even
struct member names. The disassembly would only contain numbers.
In other words, both the compiler and the disassembler can output opcode instruction names, but the disassembler merely outputs numbers instead of symbols when it refers to memory addresses. Or if it's disassembling a DLL, the disassembler might output the public symbols exported from the DLL; but (unlike the compiler) not the symbolic names of internal variables and subroutines.
Apart from that, it's the same machine code. There's also a linker, which happens after the compiler (the linker's processing will be evident in the numeric addresses shown by the disassembler).
It depends upon the compiler, and usually it might not be the same (e.g. because the compiler generates many local labels that get lost).
gcc -Wall -O -fverbose-asm -S foo.c
which produces the assembler code
foo.s that you can look into with some editor. Thanks to
-fverbose-asm that assembler file also contain useful generated comments (to help you understand what is going on).