How to extract Relay expressions following If statement

Created following in case if it helps to explain the problem to explain graph 3.
What we know about graph 3 are as follows:

  • List item it follows IF

  • List item it consumes result of IF (one of the inputs are either from true branch or false branch)

  • List item We know the start and end node.