
if (a > UINT64_MAX - b) {
    // Handle overflow error
} else {
    result = a + b;
}
