483 union {
const void *ptr;
size_t i; } u;
486 a = b = c = 0xdeadbeef + ((uint32_t)length) + *pc;
491 const uint32_t *k = (
const uint32_t *)key;
519 case 12: c+=k[2]; b+=k[1]; a+=k[0];
break;
520 case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0];
break;
521 case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0];
break;
522 case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0];
break;
523 case 8 : b+=k[1]; a+=k[0];
break;
524 case 7 : b+=k[1]&0xffffff; a+=k[0];
break;
525 case 6 : b+=k[1]&0xffff; a+=k[0];
break;
526 case 5 : b+=k[1]&0xff; a+=k[0];
break;
527 case 4 : a+=k[0];
break;
528 case 3 : a+=k[0]&0xffffff;
break;
529 case 2 : a+=k[0]&0xffff;
break;
530 case 1 : a+=k[0]&0xff;
break;
531 case 0 : *pc=c; *pb=b;
return;
536 k8 = (
const uint8_t *)k;
539 case 12: c+=k[2]; b+=k[1]; a+=k[0];
break;
540 case 11: c+=((uint32_t)k8[10])<<16;
541 case 10: c+=((uint32_t)k8[9])<<8;
543 case 8 : b+=k[1]; a+=k[0];
break;
544 case 7 : b+=((uint32_t)k8[6])<<16;
545 case 6 : b+=((uint32_t)k8[5])<<8;
547 case 4 : a+=k[0];
break;
548 case 3 : a+=((uint32_t)k8[2])<<16;
549 case 2 : a+=((uint32_t)k8[1])<<8;
550 case 1 : a+=k8[0];
break;
551 case 0 : *pc=c; *pb=b;
return;
557 const uint16_t *k = (
const uint16_t *)key;
563 a += k[0] + (((uint32_t)k[1])<<16);
564 b += k[2] + (((uint32_t)k[3])<<16);
565 c += k[4] + (((uint32_t)k[5])<<16);
572 k8 = (
const uint8_t *)k;
575 case 12: c+=k[4]+(((uint32_t)k[5])<<16);
576 b+=k[2]+(((uint32_t)k[3])<<16);
577 a+=k[0]+(((uint32_t)k[1])<<16);
579 case 11: c+=((uint32_t)k8[10])<<16;
581 b+=k[2]+(((uint32_t)k[3])<<16);
582 a+=k[0]+(((uint32_t)k[1])<<16);
585 case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
586 a+=k[0]+(((uint32_t)k[1])<<16);
588 case 7 : b+=((uint32_t)k8[6])<<16;
590 a+=k[0]+(((uint32_t)k[1])<<16);
593 case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
595 case 3 : a+=((uint32_t)k8[2])<<16;
600 case 0 : *pc=c; *pb=b;
return;
604 const uint8_t *k = (
const uint8_t *)key;
610 a += ((uint32_t)k[1])<<8;
611 a += ((uint32_t)k[2])<<16;
612 a += ((uint32_t)k[3])<<24;
614 b += ((uint32_t)k[5])<<8;
615 b += ((uint32_t)k[6])<<16;
616 b += ((uint32_t)k[7])<<24;
618 c += ((uint32_t)k[9])<<8;
619 c += ((uint32_t)k[10])<<16;
620 c += ((uint32_t)k[11])<<24;
629 case 12: c+=((uint32_t)k[11])<<24;
630 case 11: c+=((uint32_t)k[10])<<16;
631 case 10: c+=((uint32_t)k[9])<<8;
633 case 8 : b+=((uint32_t)k[7])<<24;
634 case 7 : b+=((uint32_t)k[6])<<16;
635 case 6 : b+=((uint32_t)k[5])<<8;
637 case 4 : a+=((uint32_t)k[3])<<24;
638 case 3 : a+=((uint32_t)k[2])<<16;
639 case 2 : a+=((uint32_t)k[1])<<8;
642 case 0 : *pc=c; *pb=b;
return;
#define HASH_LITTLE_ENDIAN