#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*/ find_seeds(char *, int *, int *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  int i;
  int seed1, seed2;
  if (argc < 2) {
    fprintf(
        stderr,
        "Error: please specify files on the commandline (%s file1 file2 ...)\n",
        argv[0]);
    find_seeds("c:\\temp\\lockdown-IX86-00.dll", &seed1, &seed2);
  } else {
    for (i = 1; i < argc; i++)
      find_seeds(argv[i], &seed1, &seed2);
  }
  system("pause");
  return 0;
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    1185 <main+0x55>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xed2(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1050 <find_seeds@plt>
jmp    11c4 <main+0x94>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11bf <main+0x8f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1050 <find_seeds@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118c <main+0x5c>
jmp    11c4 <main+0x94>
lea    0xe97(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r12
cmp    $0x2,%edi
jge    1176 <main+0x46>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xea7(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xee0(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <find_seeds@plt>
jmp    11a8 <main+0x78>
mov    %edi,%r13d
mov    $0x1,%ebx
lea    0xc(%rsp),%r14
lea    0x8(%rsp),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <find_seeds@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1190 <main+0x60>
lea    0xeb3(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [69 x i8] c"Error: please specify files on the commandline (%s file1 file2 ...)\0A\00"
@.str.1 = [29 x i8] c"c:\\temp\\lockdown-IX86-00.dll\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = call i32 @find_seeds(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32* %7, i32* %8)
br label %34
18: ; preds = %2
store i32 1, i32* %6
br label %19
19: ; preds = %30, %18
%20 = load i32, i32* %6
%21 = load i32, i32* %4
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %33
23: ; preds = %19
%24 = load i8**, i8*** %5
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = call i32 @find_seeds(i8* %28, i32* %7, i32* %8)
br label %30
30: ; preds = %23
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %19
33: ; preds = %19
br label %34
34: ; preds = %33, %11
%35 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [69 x i8] c"Error: please specify files on the commandline (%s file1 file2 ...)\0A\00"
@.str.1 = [29 x i8] c"c:\\temp\\lockdown-IX86-00.dll\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = icmp slt i32 %0, 2
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = zext i32 %0 to i64
br label %15
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %1
%13 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @find_seeds(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4)
br label %22
15: ; preds = %8, %15
%16 = phi i64 [ 1, %8 ], [ %20, %15 ]
%17 = getelementptr inbounds i8*, i8** %1, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @find_seeds(i8* %18, i32* %3, i32* %4)
%20 = add nuw nsw i64 %16, 1
%21 = icmp eq i64 %20, %9
br i1 %21, label %22, label %15
22: ; preds = %15, %10
%23 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}