#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*/ getRand(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ timeSeed();
int main(int argc, char **argv) {
  int count;
  printf("Seed test:");
  for (count = 0; count < 10; count++) {
    sleep(2);
    printf("%zx ", timeSeed());
  }
  printf("\n");
  printf("Random 100 to 1000 test\n");
  for (count = 0; count < 100; count++) {
    printf("%zd ", getRand(100, 1000));
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    11a4 <main+0x64>
mov    $0x2,%edi
call   1060 <sleep@plt>
mov    $0x0,%al
call   1050 <timeSeed@plt>
mov    %eax,%esi
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116b <main+0x2b>
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    11fe <main+0xbe>
mov    $0x64,%edi
mov    $0x3e8,%esi
call   1030 <getRand@plt>
mov    %eax,%esi
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c7 <main+0x87>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xe96(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
lea    0xe82(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1070 <timeSeed@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd6a(%rip),%rdi
call   1040 <puts@plt>
mov    $0x64,%ebp
lea    0xd54(%rip),%rbx
nopl   0x0(%rax)
mov    $0x64,%edi
mov    $0x3e8,%esi
call   1050 <getRand@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0xffffffff,%ebp
jne    12c0 <main+0x160>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Seed test:\00"
@.str.1 = [5 x i8] c"%zx \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [25 x i8] c"Random 100 to 1000 test\0A\00"
@.str.4 = [5 x i8] c"%zd \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %8
8: ; preds = %15, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = call i32 @sleep(i32 2)
%13 = call i32 (...) @timeSeed()
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %11
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %8
18: ; preds = %8
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %21
21: ; preds = %27, %18
%22 = load i32, i32* %6
%23 = icmp slt i32 %22, 100
br i1 %23, label %24, label %30
24: ; preds = %21
%25 = call i32 @getRand(i32 100, i32 1000)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %24
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %21
30: ; preds = %21
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
@.str = [11 x i8] c"Seed test:\00"
@.str.1 = [5 x i8] c"%zx \00"
@.str.4 = [5 x i8] c"%zd \00"
@str = [24 x i8] c"Random 100 to 1000 test\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 2)
%5 = tail call i32 (...) @timeSeed()
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @sleep(i32 2)
%8 = tail call i32 (...) @timeSeed()
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = tail call i32 @sleep(i32 2)
%11 = tail call i32 (...) @timeSeed()
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = tail call i32 @sleep(i32 2)
%14 = tail call i32 (...) @timeSeed()
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = tail call i32 @sleep(i32 2)
%17 = tail call i32 (...) @timeSeed()
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = tail call i32 @sleep(i32 2)
%20 = tail call i32 (...) @timeSeed()
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = tail call i32 @sleep(i32 2)
%23 = tail call i32 (...) @timeSeed()
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %23)
%25 = tail call i32 @sleep(i32 2)
%26 = tail call i32 (...) @timeSeed()
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = tail call i32 @sleep(i32 2)
%29 = tail call i32 (...) @timeSeed()
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = tail call i32 @sleep(i32 2)
%32 = tail call i32 (...) @timeSeed()
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %32)
%34 = tail call i32 @putchar(i32 10)
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %36
36: ; preds = %2, %36
%37 = phi i32 [ 0, %2 ], [ %40, %36 ]
%38 = tail call i32 @getRand(i32 100, i32 1000)
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %38)
%40 = add nuw nsw i32 %37, 1
%41 = icmp eq i32 %40, 100
br i1 %41, label %42, label %36
42: ; preds = %36
%43 = tail call i32 @putchar(i32 10)
ret i32 0
}