// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/extra/xxhash/xxhash.c
// Function: XXH64_finalize
static U64
XXH64_finalize(U64 h64, const void* ptr, size_t len,
               XXH_endianess endian, XXH_alignment align)
{
    const BYTE* p = (const BYTE*)ptr;

#define PROCESS1_64          \
    h64 ^= (*p) * PRIME64_5; \
    p++;                     \
    h64 = XXH_rotl64(h64, 11) * PRIME64_1;

#define PROCESS4_64          \
    h64 ^= (U64)(XXH_get32bits(p)) * PRIME64_1; \
    p+=4;                    \
    h64 = XXH_rotl64(h64, 23) * PRIME64_2 + PRIME64_3;

#define PROCESS8_64 {        \
    U64 const k1 = XXH64_round(0, XXH_get64bits(p)); \
    p+=8;                    \
    h64 ^= k1;               \
    h64  = XXH_rotl64(h64,27) * PRIME64_1 + PRIME64_4; \
}

    switch(len&31) {
      case 24: PROCESS8_64;
                    /* fallthrough */
      case 16: PROCESS8_64;
                    /* fallthrough */
      case  8: PROCESS8_64;
               return XXH64_avalanche(h64);

      case 28: PROCESS8_64;
                    /* fallthrough */
      case 20: PROCESS8_64;
                    /* fallthrough */
      case 12: PROCESS8_64;
                    /* fallthrough */
      case  4: PROCESS4_64;
               return XXH64_avalanche(h64);

      case 25: PROCESS8_64;
                    /* fallthrough */
      case 17: PROCESS8_64;
                    /* fallthrough */
      case  9: PROCESS8_64;
               PROCESS1_64;
               return XXH64_avalanche(h64);

      case 29: PROCESS8_64;
                    /* fallthrough */
      case 21: PROCESS8_64;
                    /* fallthrough */
      case 13: PROCESS8_64;
                    /* fallthrough */
      case  5: PROCESS4_64;
               PROCESS1_64;
               return XXH64_avalanche(h64);

      case 26: PROCESS8_64;
                    /* fallthrough */
      case 18: PROCESS8_64;
                    /* fallthrough */
      case 10: PROCESS8_64;
               PROCESS1_64;
               PROCESS1_64;
               return XXH64_avalanche(h64);

      case 30: PROCESS8_64;
                    /* fallthrough */
      case 22: PROCESS8_64;
                    /* fallthrough */
      case 14: PROCESS8_64;
                    /* fallthrough */
      case  6: PROCESS4_64;
               PROCESS1_64;
               PROCESS1_64;
               return XXH64_avalanche(h64);

      case 27: PROCESS8_64;
                    /* fallthrough */
      case 19: PROCESS8_64;
                    /* fallthrough */
      case 11: PROCESS8_64;
               PROCESS1_64;
               PROCESS1_64;
               PROCESS1_64;
               return XXH64_avalanche(h64);

      case 31: PROCESS8_64;
                    /* fallthrough */
      case 23: PROCESS8_64;
                    /* fallthrough */
      case 15: PROCESS8_64;
                    /* fallthrough */
      case  7: PROCESS4_64;
                    /* fallthrough */
      case  3: PROCESS1_64;
                    /* fallthrough */
      case  2: PROCESS1_64;
                    /* fallthrough */
      case  1: PROCESS1_64;
                    /* fallthrough */
      case  0: return XXH64_avalanche(h64);
    }

    /* impossible to reach */
    assert(0);
    return 0;  /* unreachable, but some compilers complain without it */
}

// Assembly:
movabsq $-0x3d4d51c2d82b14b1, %rcx # imm = 0xC2B2AE3D27D4EB4F
movabsq $-0x61c8864e7a143579, %r8 # imm = 0x9E3779B185EBCA87
movabsq $-0x7a1435883d4d519d, %r10 # imm = 0x85EBCA77C2B2AE63
movabsq $0x27d4eb2f165667c5, %r9 # imm = 0x27D4EB2F165667C5
movabsq $0x165667b19e3779f9, %rax # imm = 0x165667B19E3779F9
andl $0x1f, %edx
leaq 0x36939(%rip), %r11     # 0x6bbf0
movslq (%r11,%rdx,4), %rdx
addq %r11, %rdx
jmpq *%rdx
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
imulq %r8, %rdx
addq %r10, %rdx
jmp 0x35617
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
imulq %r8, %rdx
addq %r10, %rdx
movzbl 0x8(%rsi), %edi
imulq %r9, %rdi
xorq %rdx, %rdi
rolq $0xb, %rdi
imulq %r8, %rdi
movzbl 0x9(%rsi), %edx
imulq %r9, %rdx
xorq %rdi, %rdx
rolq $0xb, %rdx
imulq %r8, %rdx
movzbl 0xa(%rsi), %edi
jmp 0x356a3
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
imulq %r8, %rdx
addq %r10, %rdx
movzbl 0x8(%rsi), %edi
jmp 0x356a3
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movl (%rsi), %edx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x17, %rdx
addq $0x4, %rsi
imulq %rcx, %rdx
addq %rax, %rdx
movq %rdx, %rdi
movzbl (%rsi), %edx
imulq %r9, %rdx
xorq %rdi, %rdx
incq %rsi
rolq $0xb, %rdx
imulq %r8, %rdx
movq %rdx, %rdi
movzbl (%rsi), %edx
imulq %r9, %rdx
xorq %rdi, %rdx
incq %rsi
rolq $0xb, %rdx
imulq %r8, %rdx
movq %rdx, %rdi
movzbl (%rsi), %edx
imulq %r9, %rdx
xorq %rdi, %rdx
rolq $0xb, %rdx
imulq %r8, %rdx
jmp 0x35617
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movl (%rsi), %edx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x17, %rdx
imulq %rcx, %rdx
addq %rax, %rdx
movzbl 0x4(%rsi), %r10d
imulq %r9, %r10
xorq %rdx, %r10
rolq $0xb, %r10
imulq %r8, %r10
movzbl 0x5(%rsi), %edi
jmp 0x3572c
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movl (%rsi), %edx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x17, %rdx
imulq %rcx, %rdx
addq %rax, %rdx
movq %rdx, %rdi
jmp 0x3573b
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movl (%rsi), %edx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x17, %rdx
imulq %rcx, %rdx
addq %rax, %rdx
movzbl 0x4(%rsi), %edi
imulq %r9, %rdi
xorq %rdx, %rdi
jmp 0x35733
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
addq $0x8, %rsi
imulq %r8, %rdx
addq %r10, %rdx
movq %rdx, %rdi
movq (%rsi), %rdx
imulq %rcx, %rdx
rolq $0x1f, %rdx
imulq %r8, %rdx
xorq %rdi, %rdx
rolq $0x1b, %rdx
imulq %r8, %rdx
addq %r10, %rdx
movzbl 0x8(%rsi), %r10d
imulq %r9, %r10
xorq %rdx, %r10
rolq $0xb, %r10
imulq %r8, %r10
movzbl 0x9(%rsi), %edi
imulq %r9, %rdi
xorq %r10, %rdi
rolq $0xb, %rdi
imulq %r8, %rdi
movq %rdi, %rdx
shrq $0x21, %rdx
xorq %rdi, %rdx
imulq %rcx, %rdx
movq %rdx, %rcx
shrq $0x1d, %rcx
xorq %rdx, %rcx
imulq %rax, %rcx
movq %rcx, %rax
shrq $0x20, %rax
xorq %rcx, %rax
retq
nop