Probing a cosmogenic origin of astrophysical neutrinos and cosmic rays using gamma-ray observations of TXS 0506+056 — arXiv2