Thank you for raising the issue and contribution.
"Siem Reap is written as เสียมราฐ in Thai. I was once told by a teacher who taught Thai language to me that it means "conquered by Siam" in Thai." - Ponleu Cheu
The name "សៀមរាប" was given by a Royal Decree of King Ang Chan (r 1516-1566) to commemorate the King's victory over Ayuthya troops' occupation. សៀមរាប or Siem Reap, litterally means "flattened Siamese".
According to Siamese chronicles from Ayuthya to Bangkok, period of 1500-1839, the province was as always called Muang Nakhon Siem rab. For example, the so-called Ayuthya Chronicle stated that in 1595-1596 AD , "Muang Nakhon Siem rab was taken by assualt by the Governor of Khorat". According to Siamese chronicles, the province was taken at least three times, the first time was in 1259, second time was in 1595 and third time was in 1838. According to the Bangkok chronicle, សៀម Siamese troops constructed a citadel in Angkor; the construction started from January 1839 under General Phya Raja Subhavati (correct title was Chau phya Bodindr Deja, mistaken by Aymonier, Le Cambodge (1901) as Chau Khun Bodin).
Only after the construction of the citadel and in 1850s, did the name សៀមរាប/Siem Rab was slightly altered to เสียมราฐ/Siem Rath (Syama rastra "Siamese land"), "with the evident object" as a seasoned scholar/historian pointed out " of doing away with the unpleasant of the old name [Siem rab] conveyed of a Siamese defeat. But this [Siamese] attempt at tampering with history - or, at any rate, with time-honoured tradition - was just as inconsiderate and useless, as it was powerless to obliterate the fact", Lt.-colonel G.E. Gerini (1904) (Note, at the relevant times, Gerini was a top military advisor to King Chulankon and a founder of the Journal of the Siam Society, a scholarly journal, first published in 1906. Gerini's other works works: http://www.gissad.net/ )
The law code/Kram sruk (1615), the province was called "Srok Nokor".
Thai/Tai never called "their" country "Siem" សៀម. "Siam "as the official name of the country was only from the periods of 1851-1868, and 1946-1947, respectively. They had called it Muang Thai or Muang Tai.
The etymology of Siem/ សៀម is from Sanskrit śyāma ឝ្យាម which means dark, black or black, name of Siva's wife; in the ancient Hindu treatise Vishnu Purana, "Syama" refered to the name of a mountain to the Northwest of Gulf of Thailand. From pre-Angkor to Angkor periods - 1400s, according to inscriptions, the Khmer wrote/said "Syāṃ (ស្យាំ)" or "Syaṃ (ស្យំ)". From 1400s-present, we write/say "សៀម/Siem".