#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 uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  uint32_t table[256];
  uint32_t i, j, k;
  for (i = 0; i < 256; i++) {
    k = 0;
    for (j = (i << 24) | 0x800000; j != 0x80000000; j <<= 1)
      k = (k << 1) ^ (((k ^ j) & 0x80000000) ? 0x04c11db7 : 0);
    table[i] = k;
  }
  printf("static uint32_t table[256] =\n{\n");
  for (i = 0; i < 64; i++) {
    printf("  0x%08x, 0x%08x, 0x%08x, 0x%08x", table[i << 2 | 0],
           table[i << 2 | 1], table[i << 2 | 2], table[i << 2 | 3]);
    if (i < 63)
      printf(",\n");
    else
      printf("\n");
  }
  printf("};\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x414(%rbp)
cmpl   $0x100,-0x414(%rbp)
jge    11d6 <main+0xc6>
movl   $0x0,-0x41c(%rbp)
mov    -0x414(%rbp),%eax
shl    $0x18,%eax
or     $0x800000,%eax
mov    %eax,-0x418(%rbp)
cmpl   $0x80000000,-0x418(%rbp)
je     11ae <main+0x9e>
mov    -0x41c(%rbp),%eax
shl    $0x1,%eax
mov    -0x41c(%rbp),%esi
xor    -0x418(%rbp),%esi
and    $0x80000000,%esi
xor    %ecx,%ecx
mov    $0x4c11db7,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0x41c(%rbp)
mov    -0x418(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x418(%rbp)
jmp    115a <main+0x4a>
mov    -0x41c(%rbp),%ecx
movslq -0x414(%rbp),%rax
mov    %ecx,-0x410(%rbp,%rax,4)
mov    -0x414(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x414(%rbp)
jmp    112c <main+0x1c>
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x414(%rbp)
cmpl   $0x40,-0x414(%rbp)
jge    12a5 <main+0x195>
mov    -0x414(%rbp),%eax
shl    $0x2,%eax
or     $0x0,%eax
cltq
mov    -0x410(%rbp,%rax,4),%esi
mov    -0x414(%rbp),%eax
shl    $0x2,%eax
or     $0x1,%eax
cltq
mov    -0x410(%rbp,%rax,4),%edx
mov    -0x414(%rbp),%eax
shl    $0x2,%eax
or     $0x2,%eax
cltq
mov    -0x410(%rbp,%rax,4),%ecx
mov    -0x414(%rbp),%eax
shl    $0x2,%eax
or     $0x3,%eax
cltq
mov    -0x410(%rbp,%rax,4),%r8d
ff
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x3f,-0x414(%rbp)
jge    127e <main+0x16e>
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    128c <main+0x17c>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1291 <main+0x181>
mov    -0x414(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x414(%rbp)
jmp    11ee <main+0xde>
lea    0xd98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x400,%rsp
xor    %eax,%eax
xchg   %ax,%ax
mov    %eax,%ecx
shl    $0x18,%ecx
or     $0x800000,%ecx
xor    %edx,%edx
nopl   (%rax)
lea    (%rdx,%rdx,1),%esi
xor    %ecx,%edx
sar    $0x1f,%edx
and    $0x4c11db7,%edx
xor    %esi,%edx
add    %ecx,%ecx
cmp    $0x80000000,%ecx
jne    1150 <main+0x20>
mov    %edx,(%rsp,%rax,4)
add    $0x1,%rax
cmp    $0x100,%rax
jne    1140 <main+0x10>
lea    0xea1(%rip),%rdi
call   1040 <puts@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%edx
mov    0x8(%rsp),%ecx
mov    0xc(%rsp),%r8d
lea    0xe64(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe96(%rip),%r15
xor    %ebx,%ebx
nop
mov    %r15,%rdi
call   1040 <puts@plt>
mov    0x10(%rsp,%rbx,1),%esi
mov    0x14(%rsp,%rbx,1),%edx
mov    0x18(%rsp,%rbx,1),%ecx
mov    0x1c(%rsp,%rbx,1),%r8d
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x10,%rbx
cmp    $0x3f0,%rbx
jne    11b0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe4f(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str.1 = [33 x i8] c" 0x%08x, 0x%08x, 0x%08x, 0x%08x\00"
@str = [31 x i8] c"static uint32_t table[256] =\0A{\00"
@str.5 = [3 x i8] c"};\00"
@str.6 = [2 x i8] c",\00"
define i32 @main() {
%1 = alloca [256 x i32]
%2 = bitcast [256 x i32]* %1 to i8*
br label %3
3: ; preds = %0, %18
%4 = phi i64 [ 0, %0 ], [ %20, %18 ]
%5 = trunc i64 %4 to i32
%6 = shl i32 %5, 24
%7 = or i32 %6, 8388608
br label %8
8: ; preds = %3, %8
%9 = phi i32 [ 0, %3 ], [ %15, %8 ]
%10 = phi i32 [ %7, %3 ], [ %16, %8 ]
%11 = shl i32 %9, 1
%12 = xor i32 %9, %10
%13 = icmp slt i32 %12, 0
%14 = select i1 %13, i32 79764919, i32 0
%15 = xor i32 %14, %11
%16 = shl i32 %10, 1
%17 = icmp eq i32 %16, -2147483648
br i1 %17, label %18, label %8
18: ; preds = %8
%19 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %4
store i32 %15, i32* %19
%20 = add nuw nsw i64 %4, 1
%21 = icmp eq i64 %20, 256
br i1 %21, label %22, label %3
22: ; preds = %18
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%24 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 0
%25 = load i32, i32* %24
%26 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 1
%27 = load i32, i32* %26
%28 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 2
%29 = load i32, i32* %28
%30 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 3
%31 = load i32, i32* %30
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %25, i32 %27, i32 %29, i32 %31)
br label %33
33: ; preds = %22, %33
%34 = phi i64 [ 0, %22 ], [ %36, %33 ]
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.6, i64 0, i64 0))
%36 = add nuw nsw i64 %34, 1
%37 = shl nuw nsw i64 %36, 2
%38 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = or i64 %37, 1
%41 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = or i64 %37, 2
%44 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = or i64 %37, 3
%47 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %46
%48 = load i32, i32* %47
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %39, i32 %42, i32 %45, i32 %48)
%50 = icmp eq i64 %36, 63
br i1 %50, label %51, label %33
51: ; preds = %33
%52 = tail call i32 @putchar(i32 10)
%53 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}