#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*/ lsfr113();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  int j = 0;
  printf("First: %08lx\n", lsfr113());
  for (++j; j < 499; j++) {
    lsfr113();
  }
  printf("  500: %08lx\n", lsfr113());
  for (++j; j < 999; j++) {
    lsfr113();
  }
  printf(" 1000: %08lx\n", lsfr113());
  for (++j; j < 2499; j++) {
    lsfr113();
  }
  printf(" 2500: %08lx\n", lsfr113());
  for (++j; j < 9999; j++) {
    lsfr113();
  }
  printf("10000: %08lx\n", lsfr113());
  for (++j; j < 19999; j++) {
    lsfr113();
  }
  printf("20000: %08lx\n", lsfr113());
  for (++j; j < 29999; j++) {
    lsfr113();
  }
  printf("30000: %08lx\n", lsfr113());
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    %eax,%esi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1f3,-0x8(%rbp)
jge    1176 <main+0x56>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x34>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    %eax,%esi
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x3e7,-0x8(%rbp)
jge    11b6 <main+0x96>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1194 <main+0x74>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    %eax,%esi
lea    0xe56(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x9c3,-0x8(%rbp)
jge    11f6 <main+0xd6>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d4 <main+0xb4>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    %eax,%esi
lea    0xe24(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x270f,-0x8(%rbp)
jge    1236 <main+0x116>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1214 <main+0xf4>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    %eax,%esi
lea    0xdf2(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x4e1f,-0x8(%rbp)
jge    1276 <main+0x156>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1254 <main+0x134>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    %eax,%esi
lea    0xdc0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x752f,-0x8(%rbp)
jge    12b6 <main+0x196>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1294 <main+0x174>
mov    $0x0,%al
call   1030 <lsfr113@plt>
mov    %eax,%esi
lea    0xd8e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <lsfr113@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1f2,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <lsfr113@plt>
add    $0xffffffff,%ebx
jne    1140 <main+0x20>
xor    %eax,%eax
call   1030 <lsfr113@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1f3,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <lsfr113@plt>
add    $0xffffffff,%ebx
jne    1170 <main+0x50>
xor    %eax,%eax
call   1030 <lsfr113@plt>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x5db,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <lsfr113@plt>
add    $0xffffffff,%ebx
jne    11a0 <main+0x80>
xor    %eax,%eax
call   1030 <lsfr113@plt>
lea    0xe70(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1d4b,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <lsfr113@plt>
add    $0xffffffff,%ebx
jne    11d0 <main+0xb0>
xor    %eax,%eax
call   1030 <lsfr113@plt>
lea    0xe4e(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x270f,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <lsfr113@plt>
add    $0xffffffff,%ebx
jne    1200 <main+0xe0>
xor    %eax,%eax
call   1030 <lsfr113@plt>
lea    0xe2c(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x270f,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <lsfr113@plt>
add    $0xffffffff,%ebx
jne    1230 <main+0x110>
xor    %eax,%eax
call   1030 <lsfr113@plt>
lea    0xe0a(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"First: %08lx\0A\00"
@.str.1 = [14 x i8] c" 500: %08lx\0A\00"
@.str.2 = [14 x i8] c" 1000: %08lx\0A\00"
@.str.3 = [14 x i8] c" 2500: %08lx\0A\00"
@.str.4 = [14 x i8] c"10000: %08lx\0A\00"
@.str.5 = [14 x i8] c"20000: %08lx\0A\00"
@.str.6 = [14 x i8] c"30000: %08lx\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @lsfr113()
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
br label %7
7: ; preds = %12, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 499
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = call i32 (...) @lsfr113()
br label %12
12: ; preds = %10
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %7
15: ; preds = %7
%16 = call i32 (...) @lsfr113()
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %20
20: ; preds = %25, %15
%21 = load i32, i32* %2
%22 = icmp slt i32 %21, 999
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = call i32 (...) @lsfr113()
br label %25
25: ; preds = %23
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %20
28: ; preds = %20
%29 = call i32 (...) @lsfr113()
%30 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %29)
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
br label %33
33: ; preds = %38, %28
%34 = load i32, i32* %2
%35 = icmp slt i32 %34, 2499
br i1 %35, label %36, label %41
36: ; preds = %33
%37 = call i32 (...) @lsfr113()
br label %38
38: ; preds = %36
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 1
store i32 %40, i32* %2
br label %33
41: ; preds = %33
%42 = call i32 (...) @lsfr113()
%43 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %2
%45 = add nsw i32 %44, 1
store i32 %45, i32* %2
br label %46
46: ; preds = %51, %41
%47 = load i32, i32* %2
%48 = icmp slt i32 %47, 9999
br i1 %48, label %49, label %54
49: ; preds = %46
%50 = call i32 (...) @lsfr113()
br label %51
51: ; preds = %49
%52 = load i32, i32* %2
%53 = add nsw i32 %52, 1
store i32 %53, i32* %2
br label %46
54: ; preds = %46
%55 = call i32 (...) @lsfr113()
%56 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %55)
%57 = load i32, i32* %2
%58 = add nsw i32 %57, 1
store i32 %58, i32* %2
br label %59
59: ; preds = %64, %54
%60 = load i32, i32* %2
%61 = icmp slt i32 %60, 19999
br i1 %61, label %62, label %67
62: ; preds = %59
%63 = call i32 (...) @lsfr113()
br label %64
64: ; preds = %62
%65 = load i32, i32* %2
%66 = add nsw i32 %65, 1
store i32 %66, i32* %2
br label %59
67: ; preds = %59
%68 = call i32 (...) @lsfr113()
%69 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %68)
%70 = load i32, i32* %2
%71 = add nsw i32 %70, 1
store i32 %71, i32* %2
br label %72
72: ; preds = %77, %67
%73 = load i32, i32* %2
%74 = icmp slt i32 %73, 29999
br i1 %74, label %75, label %80
75: ; preds = %72
%76 = call i32 (...) @lsfr113()
br label %77
77: ; preds = %75
%78 = load i32, i32* %2
%79 = add nsw i32 %78, 1
store i32 %79, i32* %2
br label %72
80: ; preds = %72
%81 = call i32 (...) @lsfr113()
%82 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %81)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"First: %08lx\0A\00"
@.str.1 = [14 x i8] c" 500: %08lx\0A\00"
@.str.2 = [14 x i8] c" 1000: %08lx\0A\00"
@.str.3 = [14 x i8] c" 2500: %08lx\0A\00"
@.str.4 = [14 x i8] c"10000: %08lx\0A\00"
@.str.5 = [14 x i8] c"20000: %08lx\0A\00"
@.str.6 = [14 x i8] c"30000: %08lx\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @lsfr113()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 1, %0 ], [ %6, %3 ]
%5 = tail call i32 (...) @lsfr113()
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 499
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = tail call i32 (...) @lsfr113()
%10 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %11
%12 = phi i32 [ %13, %11 ], [ 499, %8 ]
%13 = add nuw nsw i32 %12, 1
%14 = tail call i32 (...) @lsfr113()
%15 = icmp eq i32 %13, 998
br i1 %15, label %16, label %11
16: ; preds = %11
%17 = tail call i32 (...) @lsfr113()
%18 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %16, %19
%20 = phi i32 [ %22, %19 ], [ 1000, %16 ]
%21 = tail call i32 (...) @lsfr113()
%22 = add nuw nsw i32 %20, 1
%23 = icmp eq i32 %22, 2499
br i1 %23, label %24, label %19
24: ; preds = %19
%25 = tail call i32 (...) @lsfr113()
%26 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %24, %27
%28 = phi i32 [ %29, %27 ], [ 2499, %24 ]
%29 = add nuw nsw i32 %28, 1
%30 = tail call i32 (...) @lsfr113()
%31 = icmp eq i32 %29, 9998
br i1 %31, label %32, label %27
32: ; preds = %27
%33 = tail call i32 (...) @lsfr113()
%34 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %32, %35
%36 = phi i32 [ %38, %35 ], [ 10000, %32 ]
%37 = tail call i32 (...) @lsfr113()
%38 = add nuw nsw i32 %36, 1
%39 = icmp eq i32 %38, 19999
br i1 %39, label %40, label %35
40: ; preds = %35
%41 = tail call i32 (...) @lsfr113()
%42 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %40, %43
%44 = phi i32 [ %45, %43 ], [ 19999, %40 ]
%45 = add nuw nsw i32 %44, 1
%46 = tail call i32 (...) @lsfr113()
%47 = icmp eq i32 %45, 29998
br i1 %47, label %48, label %43
48: ; preds = %43
%49 = tail call i32 (...) @lsfr113()
%50 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %49)
ret i32 0
}