#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 /*<<< orphan*/ p;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int main() {
  unsigned long c;
  unsigned long e;
  int i;
  int k;
  static const int p[] = {0, 1, 2, 4, 5, 7, 8, 10, 11, 12, 16, 22, 23, 26};
  e = 0;
  for (i = 0; i < sizeof(p) / sizeof(int); i++)
    e |= 1L << (31 - p[i]);
  printf("  0x00000000U");
  for (i = 1; i < 256; i++) {
    c = 0;
    for (k = i | 256; k != 1; k >>= 1) {
      c = c & 1 ? (c >> 1) ^ e : c >> 1;
      if (k & 1)
        c ^= e;
    }
    printf(i % 5 ? ", 0x%08lxU" : ",\n  0x%08lxU", c);
  }
  putchar('\n');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    $0xe,%rax
jae    1181 <main+0x61>
movslq -0x1c(%rbp),%rdx
mov    $0x1f,%eax
lea    0xea4(%rip),%rcx
sub    (%rcx,%rdx,4),%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113e <main+0x1e>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x1c(%rbp)
cmpl   $0x100,-0x1c(%rbp)
jge    1262 <main+0x142>
movq   $0x0,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
or     $0x100,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x20(%rbp)
je     1229 <main+0x109>
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     11e7 <main+0xc7>
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    11f3 <main+0xd3>
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1216 <main+0xf6>
mov    -0x18(%rbp),%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    121b <main+0xfb>
mov    -0x20(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11b6 <main+0x96>
mov    -0x1c(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
lea    0xe16(%rip),%rdi
lea    0xe04(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1196 <main+0x76>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xedb88320,%ebx
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebp
lea    0xed3(%rip),%r14
lea    0xec1(%rip),%r15
nopl   (%rax)
mov    %ebp,%eax
or     $0x100,%eax
xor    %esi,%esi
nopl   0x0(%rax)
mov    %esi,%ecx
and    $0x1,%ecx
neg    %ecx
shr    %rsi
mov    $0xedb88320,%edx
and    %ecx,%edx
xor    %rsi,%rdx
test   $0x1,%al
mov    $0x0,%esi
cmovne %rbx,%rsi
xor    %rdx,%rsi
shr    %eax
cmp    $0x1,%eax
jne    1160 <main+0x40>
imul   $0xcccccccd,%ebp,%eax
cmp    $0x33333334,%eax
mov    %r15,%rdi
cmovb  %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x100,%ebp
jne    1150 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@main.p = internal constant [14 x i32] [i32 0, i32 1, i32 2, i32 4, i32 5, i32 7, i32 8, i32 10, i32 11, i32 12, i32 16, i32 22, i32 23, i32 26]
@.str = [14 x i8] c" 0x00000000U\00"
@.str.1 = [11 x i8] c", 0x%08lxU\00"
@.str.2 = [13 x i8] c",\0A 0x%08lxU\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i64 0, i64* %3
store i32 0, i32* %4
br label %6
6: ; preds = %20, %0
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = icmp ult i64 %8, 14
br i1 %9, label %10, label %23
10: ; preds = %6
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [14 x i32], [14 x i32]* @main.p, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = sub nsw i32 31, %14
%16 = zext i32 %15 to i64
%17 = shl i64 1, %16
%18 = load i64, i64* %3
%19 = or i64 %18, %17
store i64 %19, i64* %3
br label %20
20: ; preds = %10
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %6
23: ; preds = %6
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %4
br label %25
25: ; preds = %67, %23
%26 = load i32, i32* %4
%27 = icmp slt i32 %26, 256
br i1 %27, label %28, label %70
28: ; preds = %25
store i64 0, i64* %2
%29 = load i32, i32* %4
%30 = or i32 %29, 256
store i32 %30, i32* %5
br label %31
31: ; preds = %56, %28
%32 = load i32, i32* %5
%33 = icmp ne i32 %32, 1
br i1 %33, label %34, label %59
34: ; preds = %31
%35 = load i64, i64* %2
%36 = and i64 %35, 1
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %43
38: ; preds = %34
%39 = load i64, i64* %2
%40 = lshr i64 %39, 1
%41 = load i64, i64* %3
%42 = xor i64 %40, %41
br label %46
43: ; preds = %34
%44 = load i64, i64* %2
%45 = lshr i64 %44, 1
br label %46
46: ; preds = %43, %38
%47 = phi i64 [ %42, %38 ], [ %45, %43 ]
store i64 %47, i64* %2
%48 = load i32, i32* %5
%49 = and i32 %48, 1
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %55
51: ; preds = %46
%52 = load i64, i64* %3
%53 = load i64, i64* %2
%54 = xor i64 %53, %52
store i64 %54, i64* %2
br label %55
55: ; preds = %51, %46
br label %56
56: ; preds = %55
%57 = load i32, i32* %5
%58 = ashr i32 %57, 1
store i32 %58, i32* %5
br label %31
59: ; preds = %31
%60 = load i32, i32* %4
%61 = srem i32 %60, 5
%62 = icmp ne i32 %61, 0
%63 = zext i1 %62 to i64
%64 = select i1 %62, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0)
%65 = load i64, i64* %2
%66 = call i32 (i8*, ...) @printf(i8* %64, i64 %65)
br label %67
67: ; preds = %59
%68 = load i32, i32* %4
%69 = add nsw i32 %68, 1
store i32 %69, i32* %4
br label %25
70: ; preds = %25
%71 = call i32 @putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c" 0x00000000U\00"
@.str.1 = [11 x i8] c", 0x%08lxU\00"
@.str.2 = [13 x i8] c",\0A 0x%08lxU\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %19
%3 = phi i32 [ 1, %0 ], [ %24, %19 ]
%4 = or i32 %3, 256
br label %5
5: ; preds = %2, %5
%6 = phi i32 [ %4, %2 ], [ %17, %5 ]
%7 = phi i64 [ 0, %2 ], [ %16, %5 ]
%8 = and i64 %7, 1
%9 = icmp eq i64 %8, 0
%10 = lshr i64 %7, 1
%11 = select i1 %9, i64 0, i64 3988292384
%12 = xor i64 %11, %10
%13 = and i32 %6, 1
%14 = icmp eq i32 %13, 0
%15 = select i1 %14, i64 0, i64 3988292384
%16 = xor i64 %12, %15
%17 = lshr i32 %6, 1
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %5
19: ; preds = %5
%20 = urem i32 %3, 5
%21 = icmp eq i32 %20, 0
%22 = select i1 %21, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %22, i64 %16)
%24 = add nuw nsw i32 %3, 1
%25 = icmp eq i32 %24, 256
br i1 %25, label %26, label %2
26: ; preds = %19
%27 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}