A good prhrase to translate, study and understand its grammar

“If I had had the opportunities that you had, I would not done what you did.”

In portuguese: “Se eu tivesse tido as oportunidades que você teve, eu não teria feito o que você fez.”