分岐さけるために↓みたいなコード書こうかと思ったんだけど、
boolが1にとは限らなかったりする?

int selector = value1 < value2
int out = value1 * (1 - selector) + value2 * selector