pub fn add_carry(a: u64, carry: &mut u64) -> u64
Calculate a + carry, returning the sum and modifying the carry value.