Figure out an if else

I don't know what to label the "pinfive" part. That was just an example, I am trying to figure out what to put in its place based on the IR sensor code.