#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 GLint;
typedef int GLenum;

/* Variables and functions */
#define GL_BYTE 153
#define GL_FLOAT 152
#define GL_INT 151
#define GL_SHORT 150
#define GL_UNSIGNED_BYTE 149
#define GL_UNSIGNED_BYTE_2_3_3_REV 148
#define GL_UNSIGNED_BYTE_3_3_2 147
#define GL_UNSIGNED_INT 146
#define GL_UNSIGNED_INT_10_10_10_2 145
#define GL_UNSIGNED_INT_24_8_MESA 144
#define GL_UNSIGNED_INT_24_8_NV 143
#define GL_UNSIGNED_INT_2_10_10_10_REV 142
#define GL_UNSIGNED_INT_8_24_REV_MESA 141
#define GL_UNSIGNED_INT_8_8_8_8 140
#define GL_UNSIGNED_INT_8_8_8_8_REV 139
#define GL_UNSIGNED_SHORT 138
#define GL_UNSIGNED_SHORT_15_1_MESA 137
#define GL_UNSIGNED_SHORT_1_15_REV_MESA 136
#define GL_UNSIGNED_SHORT_1_5_5_5_REV 135
#define GL_UNSIGNED_SHORT_4_4_4_4 134
#define GL_UNSIGNED_SHORT_4_4_4_4_REV 133
#define GL_UNSIGNED_SHORT_5_5_5_1 132
#define GL_UNSIGNED_SHORT_5_6_5 131
#define GL_UNSIGNED_SHORT_5_6_5_REV 130
#define GL_UNSIGNED_SHORT_8_8_APPLE 129
#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 128
GLint __glBytesPerElement(GLenum type) {
  switch (type) {
  case GL_UNSIGNED_SHORT:
  case GL_SHORT:
  case GL_UNSIGNED_SHORT_5_6_5:
  case GL_UNSIGNED_SHORT_5_6_5_REV:
  case GL_UNSIGNED_SHORT_4_4_4_4:
  case GL_UNSIGNED_SHORT_4_4_4_4_REV:
  case GL_UNSIGNED_SHORT_5_5_5_1:
  case GL_UNSIGNED_SHORT_1_5_5_5_REV:
  case GL_UNSIGNED_SHORT_8_8_APPLE:
  case GL_UNSIGNED_SHORT_8_8_REV_APPLE:
  case GL_UNSIGNED_SHORT_15_1_MESA:
  case GL_UNSIGNED_SHORT_1_15_REV_MESA:
    return 2;
  case GL_UNSIGNED_BYTE:
  case GL_BYTE:
  case GL_UNSIGNED_BYTE_3_3_2:
  case GL_UNSIGNED_BYTE_2_3_3_REV:
    return 1;
  case GL_INT:
  case GL_UNSIGNED_INT:
  case GL_FLOAT:
  case GL_UNSIGNED_INT_8_8_8_8:
  case GL_UNSIGNED_INT_8_8_8_8_REV:
  case GL_UNSIGNED_INT_10_10_10_2:
  case GL_UNSIGNED_INT_2_10_10_10_REV:
  case GL_UNSIGNED_INT_24_8_NV:
  case GL_UNSIGNED_INT_24_8_MESA:
  case GL_UNSIGNED_INT_8_24_REV_MESA:
    return 4;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<__glBytesPerElement>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffff80,%eax
sub    $0xb,%eax
jb     1186 <__glBytesPerElement+0x86>
jmp    111e <__glBytesPerElement+0x1e>
mov    -0xc(%rbp),%eax
add    $0xffffff75,%eax
sub    $0x8,%eax
jb     119e <__glBytesPerElement+0x9e>
jmp    1134 <__glBytesPerElement+0x34>
mov    -0xc(%rbp),%eax
add    $0xffffff6d,%eax
sub    $0x3,%eax
jb     1192 <__glBytesPerElement+0x92>
jmp    114a <__glBytesPerElement+0x4a>
mov    -0xc(%rbp),%eax
sub    $0x96,%eax
je     1186 <__glBytesPerElement+0x86>
jmp    115d <__glBytesPerElement+0x5d>
mov    -0xc(%rbp),%eax
add    $0xffffff69,%eax
sub    $0x2,%eax
jb     119e <__glBytesPerElement+0x9e>
jmp    1173 <__glBytesPerElement+0x73>
mov    -0xc(%rbp),%eax
sub    $0x99,%eax
je     1192 <__glBytesPerElement+0x92>
jmp    11aa <__glBytesPerElement+0xaa>
movl   $0x2,-0x4(%rbp)
jmp    11b1 <__glBytesPerElement+0xb1>
movl   $0x1,-0x4(%rbp)
jmp    11b1 <__glBytesPerElement+0xb1>
movl   $0x4,-0x4(%rbp)
jmp    11b1 <__glBytesPerElement+0xb1>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glBytesPerElement>:
add    $0xffffff80,%edi
xor    %eax,%eax
cmp    $0x19,%edi
ja     1117 <__glBytesPerElement+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @__glBytesPerElement(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 138, label %5
i32 150, label %5
i32 131, label %5
i32 130, label %5
i32 134, label %5
i32 133, label %5
i32 132, label %5
i32 135, label %5
i32 129, label %5
i32 128, label %5
i32 137, label %5
i32 136, label %5
i32 149, label %6
i32 153, label %6
i32 147, label %6
i32 148, label %6
i32 151, label %7
i32 146, label %7
i32 152, label %7
i32 140, label %7
i32 139, label %7
i32 145, label %7
i32 142, label %7
i32 143, label %7
i32 144, label %7
i32 141, label %7
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 2, i32* %2
br label %9
6: ; preds = %1, %1, %1, %1
store i32 1, i32* %2
br label %9
7: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 4, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@switch.table.__glBytesPerElement = [26 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 1, i32 1, i32 1, i32 2, i32 4, i32 4, i32 1]
define i32 @__glBytesPerElement(i32 %0) {
%2 = add i32 %0, -128
%3 = icmp ult i32 %2, 26
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [26 x i32], [26 x i32]* @switch.table.__glBytesPerElement, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}