// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/compress.cpp
// Function: compress_compatability_test()
void compress_compatability_test ()
{
	unsigned char *v = (unsigned char *)malloc (16u);
	memset (v, 0, 16u);
	if (sizeof(char) !=1 || sizeof(unsigned int) != 4 || sizeof(float) != 4)
		fail ();
	*(float *)(v+1) = 0.123f;
	if (*(unsigned int *)v != 4226247936u || *(unsigned int *)(v+1) != 1039918957u)
		fail ();
	*(float *)(v+1) = -58;
	if (*(unsigned int *)v != 1744830464u || *(unsigned int *)(v+1) != 3261595648u)
		fail ();
	float f[5] = {0.123f, 1.f, 0.f, 0.123f, 0.f};
	memset (v, ~0, 16u);
	vector_compress (VECTOR24, v, &f[0], &f[1], &f[2]);
	float_compress (FLOAT16, v+6, &f[3]);
	float_compress (FLOAT16, v+4, &f[4]);
	if (((unsigned int *)v)[0] != 4286318595u || ((unsigned int *)v)[1] != 3753771008u)
		fail ();
	float_decompress (FLOAT16, v+6, &f[3]);
	float_decompress (FLOAT16, v+4, &f[4]);
	vector_decompress (VECTOR24, v, &f[0], &f[1], &f[2]);
	float ans[5] = {0.109375f,1.015625f,0.015625f,0.123001f,0.000000f};
	int i;
	for (i=0; i<5; ++i)
		if (f[i]-ans[i] > 0.00001f || f[i]-ans[i] < -0.00001f)
			fail ();
	free (v);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl $0x10, %edi
callq 0x4410
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl $0x3dfbe76d, 0x1(%rax)  # imm = 0x3DFBE76D
cmpl $0xfbe76d00, (%rax)     # imm = 0xFBE76D00
jne 0xdc59
cmpl $0x3dfbe76d, 0x1(%rbx)  # imm = 0x3DFBE76D
je 0xdc67
leaq 0x2d962(%rip), %rdi     # 0x3b5c2
xorl %eax, %eax
callq 0xa01c
movl $0xc2680000, 0x1(%rbx)  # imm = 0xC2680000
cmpl $0x68000000, (%rbx)     # imm = 0x68000000
jne 0xdc7f
cmpl $0xc2680000, 0x1(%rbx)  # imm = 0xC2680000
je 0xdc8d
leaq 0x2d93c(%rip), %rdi     # 0x3b5c2
xorl %eax, %eax
callq 0xa01c
movdqa 0x2d8db(%rip), %xmm0    # 0x3b570
movdqa %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, (%rbx)
movl (%rsp), %r8d
xorl %eax, %eax
cmpl $0x7f7fffff, %r8d       # imm = 0x7F7FFFFF
ja 0xdd9f
movl 0x4(%rsp), %esi
cmpl $0x7f7fffff, %esi       # imm = 0x7F7FFFFF
ja 0xdd9f
movl 0x8(%rsp), %edx
movl $0x0, %r14d
movl $0x0, %ebp
movl $0x0, %edi
cmpl $0x7f7fffff, %edx       # imm = 0x7F7FFFFF
ja 0xdda6
cmpl %esi, %r8d
movl %esi, %eax
cmoval %r8d, %eax
cmpl %edx, %eax
cmovbel %edx, %eax
movl %eax, %ecx
shrl $0x17, %ecx
cmpl $0x30800000, %eax       # imm = 0x30800000
movl $0x60, %edi
cmovael %ecx, %edi
cmpl $0x40000000, %eax       # imm = 0x40000000
movl $0x7f, %eax
cmovbl %edi, %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x3fffffff, %r8d       # imm = 0x3FFFFFFF
ja 0xdd4d
movl %r8d, %r14d
andl $0x7fffff, %r14d        # imm = 0x7FFFFF
orl $0x800000, %r14d        # imm = 0x800000
shrl $0x17, %r8d
movl %eax, %ecx
subl %r8d, %ecx
incb %cl
shrl %cl, %r14d
cmpl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
ja 0xdd6e
movl %esi, %ebp
andl $0x7fffff, %ebp         # imm = 0x7FFFFF
orl $0x800000, %ebp         # imm = 0x800000
shrl $0x17, %esi
movl %eax, %ecx
subl %esi, %ecx
incb %cl
shrl %cl, %ebp
movl $0x3f000, %edi          # imm = 0x3F000
cmpl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
ja 0xdda6
movl %edx, %edi
andl $0x7fffff, %edi         # imm = 0x7FFFFF
orl $0x800000, %edi         # imm = 0x800000
shrl $0x17, %edx
movl %eax, %ecx
subl %edx, %ecx
incb %cl
shrl %cl, %edi
shrl $0x5, %edi
andl $0x3f000, %edi          # imm = 0x3F000
jmp 0xdda6
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %edi, %edi
movzbl 0x3(%rbx), %ecx
shll $0x18, %ecx
shrl $0x11, %r14d
andl $0x3f, %r14d
shrl $0xb, %ebp
andl $0xfc0, %ebp            # imm = 0xFC0
andl $0x1f, %eax
shll $0x12, %eax
orl %edi, %eax
orl %ecx, %eax
movl %r14d, %r15d
orl %ebp, %r15d
orl %eax, %r15d
movl %r15d, (%rbx)
movl 0x6(%rbx), %eax
movl %eax, %ecx
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
movl %ecx, 0x6(%rbx)
movl 0xc(%rsp), %edx
cmpl $0x7f7fffff, %edx       # imm = 0x7F7FFFFF
ja 0xde10
cmpl $0x40000000, %edx       # imm = 0x40000000
jae 0xde08
cmpl $0x30800000, %edx       # imm = 0x30800000
jb 0xde10
shrl $0xc, %edx
movzwl %dx, %eax
orl %ecx, %eax
jmp 0xde0d
orl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x6(%rbx)
movl 0x4(%rbx), %eax
movl %eax, %ecx
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
movl %ecx, 0x4(%rbx)
movl 0x10(%rsp), %edx
cmpl $0x7f7fffff, %edx       # imm = 0x7F7FFFFF
ja 0xde4c
cmpl $0x40000000, %edx       # imm = 0x40000000
jae 0xde44
cmpl $0x30800000, %edx       # imm = 0x30800000
jb 0xde4c
shrl $0xc, %edx
movzwl %dx, %eax
orl %ecx, %eax
jmp 0xde49
orl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x4(%rbx)
cmpl $0xff7c0803, %r15d      # imm = 0xFF7C0803
jne 0xde5e
cmpl $0xdfbe0000, 0x4(%rbx)  # imm = 0xDFBE0000
je 0xde6c
leaq 0x2d75d(%rip), %rdi     # 0x3b5c2
xorl %eax, %eax
callq 0xa01c
movd 0x4(%rbx), %xmm0
movd 0x6(%rbx), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
pand 0x2d66e(%rip), %xmm1    # 0x3b4f0
movdqa %xmm1, %xmm0
pslld $0xc, %xmm0
por 0x2d66d(%rip), %xmm0    # 0x3b500
pxor %xmm2, %xmm2
pcmpgtd %xmm2, %xmm1
pand %xmm0, %xmm1
movq %xmm1, 0xc(%rsp)
shll $0x11, %r14d
shll $0x5, %r15d
movl %r15d, %eax
andl $0xf800000, %eax        # imm = 0xF800000
orl %eax, %r14d
movl $0x30010000, %ecx       # imm = 0x30010000
orl %ecx, %r14d
movl %r14d, (%rsp)
shll $0xb, %ebp
orl %eax, %ebp
orl %ecx, %ebp
movl %ebp, 0x4(%rsp)
andl $0xffe0000, %r15d       # imm = 0xFFE0000
orl %ecx, %r15d
movl %r15d, 0x8(%rsp)
orl $0x30000000, %eax       # imm = 0x30000000
movd %eax, %xmm0
movsd (%rsp), %xmm1
movdqa %xmm0, %xmm2
shufps $0x0, %xmm0, %xmm2      # xmm2 = xmm2[0,0],xmm0[0,0]
subps %xmm2, %xmm1
addps %xmm1, %xmm1
movlps %xmm1, (%rsp)
movss 0x8(%rsp), %xmm1
subss %xmm0, %xmm1
addss %xmm1, %xmm1
movss %xmm1, 0x8(%rsp)
leaq 0x2d677(%rip), %r15     # 0x3b590
movaps 0x2d420(%rip), %xmm1    # 0x3b340
movss 0x2d5e8(%rip), %xmm2    # 0x3b510
leaq 0x2d693(%rip), %r14     # 0x3b5c2
xorl %r12d, %r12d
movss (%rsp,%r12), %xmm0
subss (%r12,%r15), %xmm0
andps %xmm1, %xmm0
ucomiss %xmm2, %xmm0
jbe 0xdf5f
movq %r14, %rdi
xorl %eax, %eax
callq 0xa01c
movss 0x2d5b8(%rip), %xmm2    # 0x3b510
movaps 0x2d3e1(%rip), %xmm1    # 0x3b340
addq $0x4, %r12
cmpq $0x14, %r12
jne 0xdf32
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4380
nopl (%rax)