#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 scalar_t__ GLenum;

/* Variables and functions */
scalar_t__ const GL_PACK_ALIGNMENT;
scalar_t__ const GL_PACK_LSB_FIRST;
scalar_t__ const GL_PACK_ROW_LENGTH;
scalar_t__ const GL_PACK_SKIP_PIXELS;
scalar_t__ const GL_PACK_SKIP_ROWS;
scalar_t__ const GL_PACK_SWAP_BYTES;
scalar_t__ const GL_UNPACK_ALIGNMENT;
scalar_t__ const GL_UNPACK_LSB_FIRST;
scalar_t__ const GL_UNPACK_ROW_LENGTH;
scalar_t__ const GL_UNPACK_SKIP_PIXELS;
scalar_t__ const GL_UNPACK_SKIP_ROWS;
scalar_t__ const GL_UNPACK_SWAP_BYTES;
int /*<<< orphan*/ PrintState(int, scalar_t__ const);
int /*<<< orphan*/ printf(char *);
void PrintPixelStoreState(void) {
  const GLenum enums[] = {GL_PACK_SWAP_BYTES,
                          GL_PACK_LSB_FIRST,
                          GL_PACK_ROW_LENGTH,
                          GL_PACK_SKIP_PIXELS,
                          GL_PACK_SKIP_ROWS,
                          GL_PACK_ALIGNMENT,
                          GL_UNPACK_SWAP_BYTES,
                          GL_UNPACK_LSB_FIRST,
                          GL_UNPACK_ROW_LENGTH,
                          GL_UNPACK_SKIP_PIXELS,
                          GL_UNPACK_SKIP_ROWS,
                          GL_UNPACK_ALIGNMENT,
                          0};
  int i;
  printf("Pixel pack/unpack state:\n");
  for (i = 0; enums[i]; i++) {
    PrintState(3, enums[i]);
  }
}


x86 assembly (clang, -O0):
<PrintPixelStoreState>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x2e76(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x70(%rbp)
mov    0x2e60(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x68(%rbp)
mov    0x2e7a(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x60(%rbp)
mov    0x2e8c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x58(%rbp)
mov    0x2e56(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x50(%rbp)
mov    0x2e68(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
mov    0x2e12(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
mov    0x2e1c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    0x2dee(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x2e20(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    0x2dca(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e0c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x74(%rbp)
movslq -0x74(%rbp),%rax
cmpq   $0x0,-0x70(%rbp,%rax,8)
je     121f <PrintPixelStoreState+0xff>
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rsi
mov    $0x3,%edi
call   1040 <PrintState@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11ee <PrintPixelStoreState+0xce>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintPixelStoreState>:
lea    0xf49(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@GL_PACK_SWAP_BYTES = constant i64 0
@GL_PACK_LSB_FIRST = constant i64 0
@GL_PACK_ROW_LENGTH = constant i64 0
@GL_PACK_SKIP_PIXELS = constant i64 0
@GL_PACK_SKIP_ROWS = constant i64 0
@GL_PACK_ALIGNMENT = constant i64 0
@GL_UNPACK_SWAP_BYTES = constant i64 0
@GL_UNPACK_LSB_FIRST = constant i64 0
@GL_UNPACK_ROW_LENGTH = constant i64 0
@GL_UNPACK_SKIP_PIXELS = constant i64 0
@GL_UNPACK_SKIP_ROWS = constant i64 0
@GL_UNPACK_ALIGNMENT = constant i64 0
@.str = [26 x i8] c"Pixel pack/unpack state:\0A\00"
define void @PrintPixelStoreState() {
%1 = alloca [13 x i64]
%2 = alloca i32
%3 = getelementptr inbounds [13 x i64], [13 x i64]* %1, i64 0, i64 0
%4 = load i64, i64* @GL_PACK_SWAP_BYTES
store i64 %4, i64* %3
%5 = getelementptr inbounds i64, i64* %3, i64 1
%6 = load i64, i64* @GL_PACK_LSB_FIRST
store i64 %6, i64* %5
%7 = getelementptr inbounds i64, i64* %5, i64 1
%8 = load i64, i64* @GL_PACK_ROW_LENGTH
store i64 %8, i64* %7
%9 = getelementptr inbounds i64, i64* %7, i64 1
%10 = load i64, i64* @GL_PACK_SKIP_PIXELS
store i64 %10, i64* %9
%11 = getelementptr inbounds i64, i64* %9, i64 1
%12 = load i64, i64* @GL_PACK_SKIP_ROWS
store i64 %12, i64* %11
%13 = getelementptr inbounds i64, i64* %11, i64 1
%14 = load i64, i64* @GL_PACK_ALIGNMENT
store i64 %14, i64* %13
%15 = getelementptr inbounds i64, i64* %13, i64 1
%16 = load i64, i64* @GL_UNPACK_SWAP_BYTES
store i64 %16, i64* %15
%17 = getelementptr inbounds i64, i64* %15, i64 1
%18 = load i64, i64* @GL_UNPACK_LSB_FIRST
store i64 %18, i64* %17
%19 = getelementptr inbounds i64, i64* %17, i64 1
%20 = load i64, i64* @GL_UNPACK_ROW_LENGTH
store i64 %20, i64* %19
%21 = getelementptr inbounds i64, i64* %19, i64 1
%22 = load i64, i64* @GL_UNPACK_SKIP_PIXELS
store i64 %22, i64* %21
%23 = getelementptr inbounds i64, i64* %21, i64 1
%24 = load i64, i64* @GL_UNPACK_SKIP_ROWS
store i64 %24, i64* %23
%25 = getelementptr inbounds i64, i64* %23, i64 1
%26 = load i64, i64* @GL_UNPACK_ALIGNMENT
store i64 %26, i64* %25
%27 = getelementptr inbounds i64, i64* %25, i64 1
store i64 0, i64* %27
%28 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %29
29: ; preds = %41, %0
%30 = load i32, i32* %2
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [13 x i64], [13 x i64]* %1, i64 0, i64 %31
%33 = load i64, i64* %32
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %44
35: ; preds = %29
%36 = load i32, i32* %2
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [13 x i64], [13 x i64]* %1, i64 0, i64 %37
%39 = load i64, i64* %38
%40 = call i32 @PrintState(i32 3, i64 %39)
br label %41
41: ; preds = %35
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
br label %29
44: ; preds = %29
ret void
}

LLVM IR (-O2):
@GL_PACK_SWAP_BYTES = constant i64 0
@GL_PACK_LSB_FIRST = constant i64 0
@GL_PACK_ROW_LENGTH = constant i64 0
@GL_PACK_SKIP_PIXELS = constant i64 0
@GL_PACK_SKIP_ROWS = constant i64 0
@GL_PACK_ALIGNMENT = constant i64 0
@GL_UNPACK_SWAP_BYTES = constant i64 0
@GL_UNPACK_LSB_FIRST = constant i64 0
@GL_UNPACK_ROW_LENGTH = constant i64 0
@GL_UNPACK_SKIP_PIXELS = constant i64 0
@GL_UNPACK_SKIP_ROWS = constant i64 0
@GL_UNPACK_ALIGNMENT = constant i64 0
@str = [25 x i8] c"Pixel pack/unpack state:\00"
define void @PrintPixelStoreState() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}