One of the tenets of dieoff by peak oil is that (allegedly) oil = fertilizer and there are no alternatives (allegedly).
So let's run with the false assertion that there were no non-oil based alternatives to fertilizer up till now.
Why is that? What does that mean?
Well the reason is this (or would be if it were 100% true): Most crops cannot obtain nitrogen fertilizer from the air though some can (notably legumes like peas). Those that can do not need nitrogen fertilizer or only a very little amount.
What are the consequences of this?
Well this means that we have to put artificial nitrogen fertilizer on our fields which leads to over-use which leads to nitrogen runoff which leads to fertilizer reaching the ocean which creates algae blooms which depletes oxygen which leads to fish dieoff in the ocean yadda yadda.
So it's a bit of a catch-22.
You need to put fertilizer on your crops to feed all the people but if you do it you poison the oceans which means people get less fish and the ecosphere has issues etc yadda yadda
And when the oil runs out (assuming that we see a peak and rapid decline) fertilizer will become too expensive and crop yields will decline and we can't get anything back from the ocean because the ocean is already contaminated.
So we're fucked right?
We can clean up the ocean by using targeted amounts (and thus less) fertilizer and thus limiting runoff. We also don't need to worry about oil going to fertilizer drying up because oil *isn't* the only source of nitrogen fertilizer. It's only (currently) the cheapest. Prior to the discovery of massive amounts of cheap oil, in the early industrial age, nitrogen fertilizer was mostly produced in Norway from hydro-electricity through a process which cracks the nitrogen out of the air and makes it into ammonia. So if need be we could go down that route again.
The anti-apocaliptic horseman of science rides to the rescue once more.
Turns out that researchers at the University of Nottingham in the UK have discovered a way to make the bacteria which fix nitrogen from the air in legumes, useful for all sorts of crops.
One of the non-legume crops which has been colonized by nitrogen fixing bacteria is sugar cane in Brazil. After an extensive study of those bacteria species, the U of N researchers discovered one particular species which will readily colonize all sorts of crops.
The process is something like (I'm horribly paraphrasing here to come up with an analogy): make dried probiotic with the appropriate nitrogen fixing bacteria and coat the seeds of the corresponding crops with it. When the seeds sprout, the bacteria in the probiotic colonize the roots of the crops, thus enabling them to fix nitrogen from the air just like legumes can.
Doom from peak oil induced lack of nitrogen fertilizer has thus been postponed.