-void ao_umul64_16(ao_int64_t *r, ao_int64_t *a, uint16_t b) {
- uint32_t low = a->low;
- ao_umul64(r, (uint32_t) low >> 1, (uint32_t) b << 1);
- if (low & 1) {
- if ((uint32_t) (r->low += b) < (uint32_t) b)
- r->high++;
- }
- r->high += a->high * b;
+static void ao_umul64(__ARG ao_int64_t *r, __ARG ao_int64_t *a, __ARG ao_int64_t *b) __reentrant {
+ __LOCAL ao_int64_t r2, r3;
+
+ ao_umul64_32_32(&r2, a->high, b->low);
+ ao_umul64_32_32(&r3, a->low, b->high);
+ ao_umul64_32_32(r, a->low, b->low);
+
+ r->high += r2.low + r3.low;