You are buying and eating the so called sweet variety which is safe to eat after proper cooking. The ones used for making flour is called bitter and way more toxic thus the elaborate process.
The whole Amazon was heavily populated and orcharded before Columbus and his ilk spread measles, yellow fever, smallpox, etc. Pop. estimates range up to 100M. Amazon trees are very different from their wild origins.