You do realize that in the battle for Okinawa, 12,500 US troops, 66,000 Japanese troops, and 140,000 CIVILIANS were killed? Possibly as much as 1/3 of the surviving civilian population was wounded in the fighting.
Replicate that on the scale of an invasion of the Japanese home islands. Now try to fathom the almost inconceivable cost in bloodshed that replication would have entailed. Japanese civilian casualties would have run into the millions. The atomic bombs were horrific seeds of destruction, but in the cold calculus of bloodshed, American AND Japanese, it almost certainly saved lives. Whether it was right gets into philosophical theory (should the trolley driver steer away from hitting 3 people, knowing that he'll hit 1, or should he avoid such deliberate action and let the trolley slam into the 3?); not racist or genocidal theory. Genocide is not just mass killing; genocide, as the "geno" indicates, refers to a systematic program of exterminating a single ethnic religious, or national group. Killing 20 million people, as Stalin did, though horrific and macabre, is not necessarily genocide, while killing an entire tribe of 10 people may very well be genocide.