// File: funny-falcon[P]fanom_hash/./fanom_hash32.h
// Function: fanom32_permute_string(unsigned char const*, unsigned long, unsigned int, unsigned int)
static uint32_t
fanom32_permute_string(const uint8_t *v, size_t len, uint32_t seed1, uint32_t seed2)
{
	uint32_t a=0;
	uint32_t b=0;
	uint32_t c=seed1;
	uint32_t d=seed2;
	uint32_t l = len;
	uint32_t t = 0;
	if (len <= 8) {
		b = fanom32_load_u24(v+(len&~3), len&3);
		switch (len>>2) {
		case 2:
			b = fanom32_load_u32(v+4);
		case 1:
			a = fanom32_load_u32(v);
		case 0:
			break;
		}
	} else {
		for(; len>8; len-=8, v+=8) {
			a ^= fanom32_load_u32(v);
			b ^= fanom32_load_u32(v+4);
			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 > 4) {
			a ^= fanom32_load_u32(v);
		}
		b ^= fanom32_load_u32(v+len-4);
	}
	c += b; c -= fn_rotl(a + seed2, 9);
	d += a; d -= fn_rotl(b + seed1, 18);
	t = (seed1 ^ l) - fn_rotl(a^b,7);
	c ^= t; c -= fn_rotl(t,11);
	d ^= c; d -= fn_rotl(c,25);
	t ^= d; t -= fn_rotl(d,16);
	c ^= t; c -= fn_rotl(t,4);
	d ^= c; d -= fn_rotl(c,14);
	t ^= d; t -= fn_rotl(d,24);
	return t;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movl %ecx, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movl %eax, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
cmpq $0x8, 0x28(%rsp)
ja 0x41d4
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, %rcx
andq $-0x4, %rcx
addq %rcx, %rdi
movl %eax, %esi
andl $0x3, %esi
callq 0x4450
movl %eax, 0x18(%rsp)
movq 0x28(%rsp), %rax
shrq $0x2, %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x41cd
jmp 0x4195
movq (%rsp), %rax
subq $0x1, %rax
je 0x41bf
jmp 0x41a1
movq (%rsp), %rax
subq $0x2, %rax
jne 0x41cf
jmp 0x41ad
movq 0x30(%rsp), %rdi
addq $0x4, %rdi
callq 0x44d0
movl %eax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
callq 0x44d0
movl %eax, 0x1c(%rsp)
jmp 0x41cf
jmp 0x42d7
jmp 0x41d6
cmpq $0x8, 0x28(%rsp)
jbe 0x42a2
movq 0x30(%rsp), %rdi
callq 0x44d0
xorl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x30(%rsp), %rdi
addq $0x4, %rdi
callq 0x44d0
xorl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x1c(%rsp), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x18(%rsp), %eax
addl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x1c(%rsp), %eax
shll $0x5, %eax
movl 0x1c(%rsp), %ecx
shrl $0x1b, %ecx
orl %ecx, %eax
xorl 0x10(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
shll $0x7, %eax
movl 0x18(%rsp), %ecx
shrl $0x19, %ecx
orl %ecx, %eax
xorl 0x14(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x14(%rsp), %eax
shll $0x18, %eax
movl 0x14(%rsp), %ecx
shrl $0x8, %ecx
orl %ecx, %eax
addl 0x1c(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %eax
shll %eax
movl 0x10(%rsp), %ecx
shrl $0x1f, %ecx
orl %ecx, %eax
addl 0x18(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rax
subq $0x8, %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
jmp 0x41d6
cmpq $0x4, 0x28(%rsp)
jbe 0x42bc
movq 0x30(%rsp), %rdi
callq 0x44d0
xorl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x30(%rsp), %rdi
addq 0x28(%rsp), %rdi
addq $-0x4, %rdi
callq 0x44d0
xorl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x1c(%rsp), %ecx
addl 0x20(%rsp), %ecx
shll $0x9, %ecx
movl 0x1c(%rsp), %eax
addl 0x20(%rsp), %eax
shrl $0x17, %eax
orl %eax, %ecx
movl 0x14(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
movl 0x1c(%rsp), %eax
addl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x18(%rsp), %ecx
addl 0x24(%rsp), %ecx
shll $0x12, %ecx
movl 0x18(%rsp), %eax
addl 0x24(%rsp), %eax
shrl $0xe, %eax
orl %eax, %ecx
movl 0x10(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x24(%rsp), %eax
xorl 0xc(%rsp), %eax
movl 0x1c(%rsp), %ecx
xorl 0x18(%rsp), %ecx
shll $0x7, %ecx
movl 0x1c(%rsp), %edx
xorl 0x18(%rsp), %edx
shrl $0x19, %edx
orl %edx, %ecx
subl %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
xorl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x8(%rsp), %ecx
shll $0xb, %ecx
movl 0x8(%rsp), %eax
shrl $0x15, %eax
orl %eax, %ecx
movl 0x14(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
xorl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %ecx
shll $0x19, %ecx
movl 0x14(%rsp), %eax
shrl $0x7, %eax
orl %eax, %ecx
movl 0x10(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
xorl 0x8(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x10(%rsp), %ecx
shll $0x10, %ecx
movl 0x10(%rsp), %eax
shrl $0x10, %eax
orl %eax, %ecx
movl 0x8(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
xorl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x8(%rsp), %ecx
shll $0x4, %ecx
movl 0x8(%rsp), %eax
shrl $0x1c, %eax
orl %eax, %ecx
movl 0x14(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
xorl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %ecx
shll $0xe, %ecx
movl 0x14(%rsp), %eax
shrl $0x12, %eax
orl %eax, %ecx
movl 0x10(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
xorl 0x8(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x10(%rsp), %ecx
shll $0x18, %ecx
movl 0x10(%rsp), %eax
shrl $0x8, %eax
orl %eax, %ecx
movl 0x8(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)