Suppose $a$, $b$, $c$ are positive integers with $a+b+c=12$ and $\gcd(a,b)+\gcd(b,c)+\gcd(c,a)=6$. What is the sum of all possible distinct values of $a^2+b^2+c^2$?
The gcd values (in some order) are $\{1,1,4\}$, $\{1,2,3\}$, or $\{2,2,2\}$.
If $\gcd(a,b)=4$, then $4\mid a+b=12-c$, so $4\mid c$ and $\gcd(a,c)\ge4$: impossible. If $\gcd(a,b)=3$, then $3\mid c$ and $\gcd(a,c)\ge3$: impossible.
So all gcds are $2$: $a,b,c$ are even, and $a/2+b/2+c/2=6$ with pairwise coprime halves: $\{1,1,4\}$ or $\{1,2,3\}$, i.e.\ $(2,2,8)$ or $(2,4,6)$.
The values are $72$ and $56$, with sum $\boxed{128}$.