That first line is just the beginning of a statement that goes on until line 71. It decides whether to eat or pray if the player is very hungry. (In NetHack you can die of starvation if you don't have enough nutrition; nutrition can be obtained either by eating food[1], or in some circumstances by praying when hungry.)
The second function is easier for me to understand: it says that the player wants protection if the player has less than 3 intrinsic protection and has an experience level higher than 15. (In NetHack, gods grant intrinsic protection under some circumstances, which causes one to become better armored even without wearing additional physical armor. It's basically like a kind of magical armor on one's body that's independent of any physical object.) The idea seems to be that a player with at least experience level 15 ought to have 3 or more points of protection, and if the player doesn't, the player should try to go and get them.
If you're not used to reading parenthesized prefix notation, you might have a look at
https://en.wikipedia.org/wiki/Polish_notation
https://en.wikipedia.org/wiki/S-expression
https://en.wikipedia.org/wiki/Lisp_%28programming_language%2...
[1] In another example of NetHack's complexity, it's also possible in some circumstances to eat objects other than food, by turning into a monster that's able to eat the objects in question.