#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  unsigned int startState[4] = {0xC70337DB, 0x7F4D514F, 0x75377599, 0x7D5937A3};
  unsigned int taps = 0xD0000001;
  unsigned int lfsr[4];
  int i, n;
  for (i = 0; i < 4; i++) {
    lfsr[i] = startState[i];
  }
  for (n = 0; n < 530; n++) {
    printf("%03d:  ", n - 10);
    for (i = 0; i < 4; i++) {
      printf("%02X  ", (lfsr[i] >> 24) & 0xFF);
      printf("%02X  ", (lfsr[i] >> 16) & 0xFF);
      printf("%02X  ", (lfsr[i] >> 8) & 0xFF);
      printf("%02X  ", (lfsr[i] >> 0) & 0xFF);
    }
    printf("\n");
    for (i = 0; i < 4; i++) {
      if ((lfsr[i] & 1) == 0) {
        lfsr[i] = lfsr[i] >> 1;
      } else {
        lfsr[i] = (lfsr[i] >> 1) ^ taps;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0xd0000001,-0x24(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x4,-0x44(%rbp)
jge    116b <main+0x5b>
movslq -0x44(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%ecx
movslq -0x44(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1143 <main+0x33>
movl   $0x0,-0x48(%rbp)
cmpl   $0x212,-0x48(%rbp)
jge    12b5 <main+0x1a5>
mov    -0x48(%rbp),%esi
sub    $0xa,%esi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x4,-0x44(%rbp)
jge    122e <main+0x11e>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
shr    $0x18,%esi
and    $0xff,%esi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
shr    $0x10,%esi
and    $0xff,%esi
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
shr    $0x8,%esi
and    $0xff,%esi
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
shr    $0x0,%esi
and    $0xff,%esi
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    119a <main+0x8a>
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x4,-0x44(%rbp)
jge    12a2 <main+0x192>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1279 <main+0x169>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
shr    $0x1,%ecx
movslq -0x44(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
jmp    128f <main+0x17f>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
shr    $0x1,%ecx
xor    -0x24(%rbp),%ecx
movslq -0x44(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
jmp    1294 <main+0x184>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1243 <main+0x133>
jmp    12a7 <main+0x197>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1172 <main+0x62>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
movdqa 0xece(%rip),%xmm0
mov    $0xfffffff6,%r15d
lea    0xee1(%rip),%r14
lea    0xee2(%rip),%rbp
movdqa %xmm0,%xmm1
nopw   0x0(%rax,%rax,1)
movdqa %xmm0,(%rsp)
movdqa %xmm1,0x10(%rsp)
mov    %r14,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
pshufd $0xff,(%rsp),%xmm0
movd   %xmm0,%ebx
mov    %ebx,%eax
shr    $0x18,%eax
mov    %rbp,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl %bh,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl %bl,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
pshufd $0xee,(%rsp),%xmm0
movd   %xmm0,%ebx
mov    %ebx,%eax
shr    $0x18,%eax
mov    %rbp,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl %bh,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl %bl,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
pshufd $0x55,(%rsp),%xmm0
movd   %xmm0,%ebx
mov    %ebx,%eax
shr    $0x18,%eax
mov    %rbp,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl %bh,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl %bl,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movdqa (%rsp),%xmm0
movd   %xmm0,%ebx
mov    %ebx,%eax
shr    $0x18,%eax
mov    %rbp,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl %bh,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl %bl,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movdqa 0x10(%rsp),%xmm1
psrld  $0x1,%xmm1
movdqa (%rsp),%xmm2
pslld  $0x1f,%xmm2
psrad  $0x1f,%xmm2
movdqa %xmm2,%xmm0
pandn  %xmm1,%xmm0
pxor   0xd59(%rip),%xmm1
pand   %xmm2,%xmm1
por    %xmm0,%xmm1
add    $0x1,%r15d
movdqa %xmm1,%xmm0
cmp    $0x208,%r15d
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.startState = [4 x i32] [i32 -956090405, i32 2135773519, i32 1966568857, i32 2102998947]
@.str = [8 x i8] c"%03d: \00"
@.str.1 = [7 x i8] c"%02X \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca i32
%4 = alloca [4 x i32]
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [4 x i32]* %2 to i8*
store i32 -805306367, i32* %3
store i32 0, i32* %5
br label %8
8: ; preds = %19, %0
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %17
store i32 %15, i32* %18
br label %19
19: ; preds = %11
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %8
22: ; preds = %8
store i32 0, i32* %6
br label %23
23: ; preds = %102, %22
%24 = load i32, i32* %6
%25 = icmp slt i32 %24, 530
br i1 %25, label %26, label %105
26: ; preds = %23
%27 = load i32, i32* %6
%28 = sub nsw i32 %27, 10
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %28)
store i32 0, i32* %5
br label %30
30: ; preds = %62, %26
%31 = load i32, i32* %5
%32 = icmp slt i32 %31, 4
br i1 %32, label %33, label %65
33: ; preds = %30
%34 = load i32, i32* %5
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = lshr i32 %37, 24
%39 = and i32 %38, 255
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %5
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %42
%44 = load i32, i32* %43
%45 = lshr i32 %44, 16
%46 = and i32 %45, 255
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %5
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = lshr i32 %51, 8
%53 = and i32 %52, 255
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %53)
%55 = load i32, i32* %5
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = lshr i32 %58, 0
%60 = and i32 %59, 255
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %60)
br label %62
62: ; preds = %33
%63 = load i32, i32* %5
%64 = add nsw i32 %63, 1
store i32 %64, i32* %5
br label %30
65: ; preds = %30
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %67
67: ; preds = %98, %65
%68 = load i32, i32* %5
%69 = icmp slt i32 %68, 4
br i1 %69, label %70, label %101
70: ; preds = %67
%71 = load i32, i32* %5
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %72
%74 = load i32, i32* %73
%75 = and i32 %74, 1
%76 = icmp eq i32 %75, 0
br i1 %76, label %77, label %86
77: ; preds = %70
%78 = load i32, i32* %5
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %79
%81 = load i32, i32* %80
%82 = lshr i32 %81, 1
%83 = load i32, i32* %5
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %84
store i32 %82, i32* %85
br label %97
86: ; preds = %70
%87 = load i32, i32* %5
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %88
%90 = load i32, i32* %89
%91 = lshr i32 %90, 1
%92 = load i32, i32* %3
%93 = xor i32 %91, %92
%94 = load i32, i32* %5
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 %95
store i32 %93, i32* %96
br label %97
97: ; preds = %86, %77
br label %98
98: ; preds = %97
%99 = load i32, i32* %5
%100 = add nsw i32 %99, 1
store i32 %100, i32* %5
br label %67
101: ; preds = %67
br label %102
102: ; preds = %101
%103 = load i32, i32* %6
%104 = add nsw i32 %103, 1
store i32 %104, i32* %6
br label %23
105: ; preds = %23
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%03d: \00"
@.str.1 = [7 x i8] c"%02X \00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %56, %1 ]
%3 = phi <4 x i32> [ <i32 2102998947, i32 1966568857, i32 2135773519, i32 -956090405>, %0 ], [ %55, %1 ]
%4 = add nsw i32 %2, -10
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = extractelement <4 x i32> %3, i64 3
%7 = lshr i32 %6, 24
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = lshr i32 %6, 16
%10 = and i32 %9, 255
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = lshr i32 %6, 8
%13 = and i32 %12, 255
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = and i32 %6, 255
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = extractelement <4 x i32> %3, i64 2
%18 = lshr i32 %17, 24
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = lshr i32 %17, 16
%21 = and i32 %20, 255
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%23 = lshr i32 %17, 8
%24 = and i32 %23, 255
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = and i32 %17, 255
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = extractelement <4 x i32> %3, i64 1
%29 = lshr i32 %28, 24
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = lshr i32 %28, 16
%32 = and i32 %31, 255
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %32)
%34 = lshr i32 %28, 8
%35 = and i32 %34, 255
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %35)
%37 = and i32 %28, 255
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%39 = extractelement <4 x i32> %3, i64 0
%40 = lshr i32 %39, 24
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%42 = lshr i32 %39, 16
%43 = and i32 %42, 255
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = lshr i32 %39, 8
%46 = and i32 %45, 255
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = and i32 %39, 255
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %48)
%50 = tail call i32 @putchar(i32 10)
%51 = and <4 x i32> %3, <i32 1, i32 1, i32 1, i32 1>
%52 = icmp eq <4 x i32> %51, zeroinitializer
%53 = lshr <4 x i32> %3, <i32 1, i32 1, i32 1, i32 1>
%54 = xor <4 x i32> %53, <i32 -805306367, i32 -805306367, i32 -805306367, i32 -805306367>
%55 = select <4 x i1> %52, <4 x i32> %53, <4 x i32> %54
%56 = add nuw nsw i32 %2, 1
%57 = icmp eq i32 %56, 530
br i1 %57, label %58, label %1
58: ; preds = %1
ret i32 0
}