#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int GLubyte;
typedef float GLfloat;

/* Variables and functions */
void extract332(int isSwap, const void *packedPixel,
                GLfloat extractComponents[]) {
  GLubyte ubyte = *(const GLubyte *)packedPixel;
  isSwap = isSwap;
  extractComponents[0] = (float)((ubyte & 0xe0) >> 5) / 7.0;
  extractComponents[1] = (float)((ubyte & 0x1c) >> 2) / 7.0;
  extractComponents[2] = (float)((ubyte & 0x03)) / 3.0;
}


x86 assembly (clang, -O0):
<extract332>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x1c(%rbp),%eax
and    $0xe0,%eax
sar    $0x5,%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xecf(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x1c(%rbp),%eax
and    $0x1c,%eax
sar    $0x2,%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x1c(%rbp),%eax
and    $0x3,%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe77(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract332>:
mov    (%rsi),%eax
mov    %eax,%ecx
shr    $0x5,%ecx
and    $0x7,%ecx
cvtsi2ss %ecx,%xmm0
movss  0xeea(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,(%rdx)
mov    %eax,%ecx
shr    $0x2,%ecx
and    $0x7,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
divss  %xmm1,%xmm0
and    $0x3,%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
movss  %xmm0,0x4(%rdx)
divss  0xebc(%rip),%xmm1
movss  %xmm1,0x8(%rdx)
ret

LLVM IR (-O0):
define void @extract332(i32 %0, i8* %1, float* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca float*
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store float* %2, float** %6
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %7
%11 = load i32, i32* %4
store i32 %11, i32* %4
%12 = load i32, i32* %7
%13 = and i32 %12, 224
%14 = ashr i32 %13, 5
%15 = sitofp i32 %14 to float
%16 = fpext float %15 to double
%17 = fdiv double %16, 7.000000e+00
%18 = fptrunc double %17 to float
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 0
store float %18, float* %20
%21 = load i32, i32* %7
%22 = and i32 %21, 28
%23 = ashr i32 %22, 2
%24 = sitofp i32 %23 to float
%25 = fpext float %24 to double
%26 = fdiv double %25, 7.000000e+00
%27 = fptrunc double %26 to float
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 1
store float %27, float* %29
%30 = load i32, i32* %7
%31 = and i32 %30, 3
%32 = sitofp i32 %31 to float
%33 = fpext float %32 to double
%34 = fdiv double %33, 3.000000e+00
%35 = fptrunc double %34 to float
%36 = load float*, float** %6
%37 = getelementptr inbounds float, float* %36, i64 2
store float %35, float* %37
ret void
}

LLVM IR (-O2):
define void @extract332(i32 %0, i8* nocapture %1, float* nocapture writeonly %2) {
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = lshr i32 %5, 5
%7 = and i32 %6, 7
%8 = sitofp i32 %7 to float
%9 = fdiv float %8, 7.000000e+00
store float %9, float* %2
%10 = lshr i32 %5, 2
%11 = and i32 %10, 7
%12 = sitofp i32 %11 to float
%13 = fdiv float %12, 7.000000e+00
%14 = getelementptr inbounds float, float* %2, i64 1
store float %13, float* %14
%15 = and i32 %5, 3
%16 = sitofp i32 %15 to float
%17 = fdiv float %16, 3.000000e+00
%18 = getelementptr inbounds float, float* %2, i64 2
store float %17, float* %18
ret void
}