// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/compress.h
// Function: vector_compress(vector_type, void*, float const*, float const*, float const*)
inline void vector_compress
	(vector_type t, void *s, const float *f1, const float *f2, const float *f3)
{
	unsigned int *m = (unsigned int *)s;
	const unsigned int *p1 = (const unsigned int *)f1;
	const unsigned int *p2 = (const unsigned int *)f2;
	const unsigned int *p3 = (const unsigned int *)f3;
	unsigned int max, i1, i2, i3;
	switch (t)
	{
	case VECTOR96:
		m[0] = *p1;
		m[1] = *p2;
		m[2] = *p3;
		break;
	case VECTOR48:
		if (float_iswrong (*p1) || float_iswrong (*p2) || float_iswrong (*p3))
			break;
		m[0] = 0, m[1] = bitclr (m[1], 0, 16);
		if (float_istoobig (*p1))
			m[0] |= bitget (~0u, 0, 16);
		else if (float_istoosmall (*p1))
			;
		else
			m[0] |= bitget (*p1, 12, 28);
		if (float_istoobig (*p2))
			m[0] |= bitput (bitget (~0u, 0, 16), 16, 32);
		else if (float_istoosmall (*p2))
			;
		else
			m[0] |= bitput (bitget (*p2, 12, 28), 16, 32);
		if (float_istoobig (*p3))
			m[1] |= bitget (~0u, 0, 16);
		else if (float_istoosmall (*p3))
			;
		else
			m[1] |= bitget (*p3, 12, 28);
		break;
	case VECTOR32:
	case VECTOR24:
		if (float_iswrong (*p1) || float_iswrong (*p2) || float_iswrong (*p3))
		{
			max = i1 = i2 = i3 = 0;
		}
		else
		{
			max = *p1>*p2? (*p1>*p3? *p1: *p3): (*p2>*p3? *p2: *p3);
			max = float_istoobig (max)? 0x7F : float_istoosmall (max)? 0x60 : bitget (max, 23, 31);
			i1 = float_istoobig (*p1)? ~0u : (bitget (*p1, 0, 23) | bitput (1, 23, 24)) >> (1 + max - bitget (*p1, 23, 31));
			i2 = float_istoobig (*p2)? ~0u : (bitget (*p2, 0, 23) | bitput (1, 23, 24)) >> (1 + max - bitget (*p2, 23, 31));
			i3 = float_istoobig (*p3)? ~0u : (bitget (*p3, 0, 23) | bitput (1, 23, 24)) >> (1 + max - bitget (*p3, 23, 31));
		}
		if (t == VECTOR32)
			m[0] = 0
				| bitput (bitget (i1, 14, 23), 0, 9)
				| bitput (bitget (i2, 14, 23), 9, 18)
				| bitput (bitget (i3, 14, 23), 18, 27)
				| bitput (bitget (max, 0, 5), 27, 32)
				;
		else
			m[0] = bitclr (m[0], 0, 24)
				| bitput (bitget (i1, 17, 23), 0, 6)
				| bitput (bitget (i2, 17, 23), 6, 12)
				| bitput (bitget (i3, 17, 23), 12, 18)
				| bitput (bitget (max, 0, 5), 18, 23)
				;
		break;
	default:
		;
	}
}

// Assembly:
leal -0x2(%rdi), %eax
cmpl $0x2, %eax
jb 0x376a1
cmpl $0x1, %edi
je 0x377d8
testl %edi, %edi
jne 0x378a8
movl (%rdx), %eax
movl %eax, (%rsi)
movl (%rcx), %eax
movl %eax, 0x4(%rsi)
movl (%r8), %eax
movl %eax, 0x8(%rsi)
retq
pushq %rbx
movl (%rdx), %ebx
xorl %eax, %eax
cmpl $0x7f7fffff, %ebx       # imm = 0x7F7FFFFF
ja 0x37797
movl (%rcx), %r11d
cmpl $0x7f7fffff, %r11d      # imm = 0x7F7FFFFF
ja 0x37797
movl (%r8), %r10d
movl $0x0, %r8d
movl $0x0, %edx
movl $0x0, %r9d
cmpl $0x7f7fffff, %r10d      # imm = 0x7F7FFFFF
ja 0x3779f
cmpl %r11d, %ebx
movl %r11d, %eax
cmoval %ebx, %eax
cmpl %r10d, %eax
cmovbel %r10d, %eax
movl %eax, %ecx
shrl $0x17, %ecx
cmpl $0x30800000, %eax       # imm = 0x30800000
movl $0x60, %edx
cmovael %ecx, %edx
cmpl $0x40000000, %eax       # imm = 0x40000000
movl $0x7f, %eax
cmovbl %edx, %eax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
cmpl $0x3fffffff, %ebx       # imm = 0x3FFFFFFF
ja 0x37742
movl %ebx, %r8d
andl $0x7fffff, %r8d         # imm = 0x7FFFFF
orl $0x800000, %r8d         # imm = 0x800000
shrl $0x17, %ebx
movl %eax, %ecx
subl %ebx, %ecx
incb %cl
shrl %cl, %r8d
cmpl $0x3fffffff, %r11d      # imm = 0x3FFFFFFF
ja 0x37767
movl %r11d, %edx
andl $0x7fffff, %edx         # imm = 0x7FFFFF
orl $0x800000, %edx         # imm = 0x800000
shrl $0x17, %r11d
movl %eax, %ecx
subl %r11d, %ecx
incb %cl
shrl %cl, %edx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
cmpl $0x3fffffff, %r10d      # imm = 0x3FFFFFFF
ja 0x3779f
movl %r10d, %r9d
andl $0x7fffff, %r9d         # imm = 0x7FFFFF
orl $0x800000, %r9d         # imm = 0x800000
shrl $0x17, %r10d
movl %eax, %ecx
subl %r10d, %ecx
incb %cl
shrl %cl, %r9d
jmp 0x3779f
xorl %r8d, %r8d
xorl %edx, %edx
xorl %r9d, %r9d
cmpl $0x2, %edi
popq %rbx
jne 0x37875
shrl $0xe, %r8d
andl $0x1ff, %r8d            # imm = 0x1FF
shrl $0x5, %edx
andl $0x3fe00, %edx          # imm = 0x3FE00
shll $0x4, %r9d
andl $0x7fc0000, %r9d        # imm = 0x7FC0000
shll $0x1b, %eax
orl %r8d, %eax
orl %edx, %eax
orl %r9d, %eax
jmp 0x378a6
cmpl $0x7f7fffff, (%rdx)     # imm = 0x7F7FFFFF
ja 0x378a8
cmpl $0x7f7fffff, (%rcx)     # imm = 0x7F7FFFFF
ja 0x378a8
cmpl $0x7f7fffff, (%r8)      # imm = 0x7F7FFFFF
ja 0x378a8
movl $0x0, (%rsi)
movl 0x4(%rsi), %edi
movl %edi, %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
movl %eax, 0x4(%rsi)
movl (%rdx), %edx
movl $0xffff, %r9d           # imm = 0xFFFF
cmpl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
ja 0x3782f
cmpl $0x30800000, %edx       # imm = 0x30800000
jb 0x37832
shrl $0xc, %edx
movzwl %dx, %r9d
movl %r9d, (%rsi)
movl (%rcx), %ecx
movl $0xffff0000, %edx       # imm = 0xFFFF0000
cmpl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
ja 0x37854
cmpl $0x30800000, %ecx       # imm = 0x30800000
jb 0x37856
shll $0x4, %ecx
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
movl %ecx, %edx
orl %edx, (%rsi)
movl (%r8), %ecx
cmpl $0x40000000, %ecx       # imm = 0x40000000
jae 0x378a9
cmpl $0x30800000, %ecx       # imm = 0x30800000
jb 0x378a8
shrl $0xc, %ecx
movzwl %cx, %ecx
orl %eax, %ecx
movl %ecx, 0x4(%rsi)
retq
movzbl 0x3(%rsi), %ecx
shll $0x18, %ecx
shrl $0x11, %r8d
shll $0x12, %eax
orl %r8d, %eax
shrl $0xb, %edx
andl $0xfc0, %edx            # imm = 0xFC0
shrl $0x5, %r9d
andl $0x3f000, %r9d          # imm = 0x3F000
andl $0x7c003f, %eax         # imm = 0x7C003F
orl %edx, %eax
orl %r9d, %eax
orl %ecx, %eax
movl %eax, (%rsi)
retq
orl $0xffff, %edi           # imm = 0xFFFF
movl %edi, 0x4(%rsi)
retq
nopw %cs:(%rax,%rax)
nopl (%rax)