-/* Get max O2/He permille levels for a dive for the dive summary */
-static void get_dive_gas(struct dive *dive, int *o2, int *he)
+/*
+ * Get "maximal" dive gas for a dive.
+ * Rules:
+ * - Trimix trumps nitrox (highest He wins, O2 breaks ties)
+ * - Nitrox trumps air (even if hypoxic)
+ * These are the same rules as the inter-dive sorting rules.
+ */
+static void get_dive_gas(struct dive *dive, int *o2, int *he, int *o2low)