Yes any of the above could be right
OK, so let's move on to other things. We can come back to the flood later.
but which account is more realistic?
The Utnapishtim account, but that's probably not what you were expecting me to say.
But let's move back to the Code of Hammurabi, in this case, we aren't just talking about two different cultures coincidentally saying that a person should be punished like for like. They use the same examples! Not "An arm for an arm", not "injury for injury", but specifically:
"If a man put out the eye of another man, his eye shall be put out... If he break another man's bone, his bone shall be broken...If a man knock out the teeth of his equal, his teeth shall be knocked out"
Compared with
"fracture for fracture, eye for eye, tooth for tooth; as he has injured someone, so shall it be done to him."
Surely this would require an explanation? Wouldn't it make more sense to consider that this is a result of ideas crossing borders than to believe that the cultures invented it independently (or where inspired independently by some deity of some kind, if you prefer).