// File: funny-falcon[P]fanom_hash/./fanom_hash.h
// Function: fanom64_permute_string(unsigned char const*, unsigned long, unsigned long, unsigned long)
static inline uint64_t
fanom64_permute_string(const uint8_t *v, size_t len, uint64_t seed1, uint64_t seed2)
{
	uint64_t a=0;
	uint64_t b=0;
	uint64_t c=seed1;
	uint64_t d=seed2;
	uint64_t l = len;
	uint64_t t = 0;
	if (len <= 16) {
		b = fanom64_load_u24(v+(len&~3), len&3);
		switch (len>>2) {
		case 0:
			break;
		case 1:
			a = fanom64_load_u32(v);
			break;
		case 3:
			b |= (uint64_t)fanom64_load_u32(v+8) << 32;
		case 2:
			a = fanom64_load_u64(v);
			break;
		case 4:
			a = fanom64_load_u64(v);
			b = fanom64_load_u64(v+8);
			break;
		}
	} else {
		for(; len>16; len-=16, v+=16) {
			a ^= fanom64_load_u64(v);
			b ^= fanom64_load_u64(v+8);
			c += a;
			d += b;
			a = fn_rotl(a, 5) ^ d;
			b = fn_rotl(b, 7) ^ c;
			c = fn_rotl(c, 24) + a;
			d = fn_rotl(d, 1) + b;
		}
		if (len > 8) {
			a ^= fanom64_load_u64(v);
		}
		b ^= fanom64_load_u64(v+len-8);
	}
	c += b; c -= fn_rotl(a + seed2, 9);
	d += a; d -= fn_rotl(b + seed1, 58);
	t = (seed1 ^ l) - fn_rotl(a^b, 7);
	t ^= d; t -= fn_rotl(d,46);
	c ^= t; c -= fn_rotl(t,22);
	d ^= c; d -= fn_rotl(c,50);
	t ^= d; t -= fn_rotl(d,31);
	c ^= t; c -= fn_rotl(t,7);
	d ^= c; d -= fn_rotl(c,27);
	t ^= d; t -= fn_rotl(d,48);
	return t;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
cmpq $0x10, 0x48(%rsp)
ja 0x3d34
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
movq %rax, %rcx
andq $-0x4, %rcx
addq %rcx, %rdi
movl %eax, %esi
andl $0x3, %esi
callq 0x4070
movl %eax, %eax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
shrq $0x2, %rax
movq %rax, (%rsp)
subq $0x4, %rax
ja 0x3d2f
movq (%rsp), %rax
leaq 0x436c(%rip), %rcx      # 0x802c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x3d2f
movq 0x50(%rsp), %rdi
callq 0x40f0
movl %eax, %eax
movq %rax, 0x30(%rsp)
jmp 0x3d2f
movq 0x50(%rsp), %rdi
addq $0x8, %rdi
callq 0x40f0
movl %eax, %eax
shlq $0x20, %rax
orq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
callq 0x4100
movq %rax, 0x30(%rsp)
jmp 0x3d2f
movq 0x50(%rsp), %rdi
callq 0x4100
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rdi
addq $0x8, %rdi
callq 0x4100
movq %rax, 0x28(%rsp)
jmp 0x3e61
jmp 0x3d36
cmpq $0x10, 0x48(%rsp)
jbe 0x3e28
movq 0x50(%rsp), %rdi
callq 0x4100
xorq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rdi
addq $0x8, %rdi
callq 0x4100
xorq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rax
shlq $0x5, %rax
movq 0x30(%rsp), %rcx
shrq $0x3b, %rcx
orq %rcx, %rax
xorq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rax
shlq $0x7, %rax
movq 0x28(%rsp), %rcx
shrq $0x39, %rcx
orq %rcx, %rax
xorq 0x20(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
shlq $0x18, %rax
movq 0x20(%rsp), %rcx
shrq $0x28, %rcx
orq %rcx, %rax
addq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
shlq %rax
movq 0x18(%rsp), %rcx
shrq $0x3f, %rcx
orq %rcx, %rax
addq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
subq $0x10, %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x50(%rsp)
jmp 0x3d36
cmpq $0x8, 0x48(%rsp)
jbe 0x3e44
movq 0x50(%rsp), %rdi
callq 0x4100
xorq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rdi
addq 0x48(%rsp), %rdi
addq $-0x8, %rdi
callq 0x4100
xorq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rcx
addq 0x38(%rsp), %rcx
shlq $0x9, %rcx
movq 0x30(%rsp), %rax
addq 0x38(%rsp), %rax
shrq $0x37, %rax
orq %rax, %rcx
movq 0x20(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rcx
addq 0x40(%rsp), %rcx
shlq $0x3a, %rcx
movq 0x28(%rsp), %rax
addq 0x40(%rsp), %rax
shrq $0x6, %rax
orq %rax, %rcx
movq 0x18(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
xorq 0x10(%rsp), %rax
movq 0x30(%rsp), %rcx
xorq 0x28(%rsp), %rcx
shlq $0x7, %rcx
movq 0x30(%rsp), %rdx
xorq 0x28(%rsp), %rdx
shrq $0x39, %rdx
orq %rdx, %rcx
subq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
xorq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rcx
shlq $0x2e, %rcx
movq 0x18(%rsp), %rax
shrq $0x12, %rax
orq %rax, %rcx
movq 0x8(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
xorq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rcx
shlq $0x16, %rcx
movq 0x8(%rsp), %rax
shrq $0x2a, %rax
orq %rax, %rcx
movq 0x20(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
xorq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rcx
shlq $0x32, %rcx
movq 0x20(%rsp), %rax
shrq $0xe, %rax
orq %rax, %rcx
movq 0x18(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
xorq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rcx
shlq $0x1f, %rcx
movq 0x18(%rsp), %rax
shrq $0x21, %rax
orq %rax, %rcx
movq 0x8(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
xorq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rcx
shlq $0x7, %rcx
movq 0x8(%rsp), %rax
shrq $0x39, %rax
orq %rax, %rcx
movq 0x20(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
xorq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rcx
shlq $0x1b, %rcx
movq 0x20(%rsp), %rax
shrq $0x25, %rax
orq %rax, %rcx
movq 0x18(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
xorq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rcx
shlq $0x30, %rcx
movq 0x18(%rsp), %rax
shrq $0x10, %rax
orq %rax, %rcx
movq 0x8(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax)