#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 */
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ generate_filters_brute_force();
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ lrand48();
int /*<<< orphan*/ main_ellf(int /*<<< orphan*/ *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ srand48(scalar_t__);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  {
    struct timeval tv;
    gettimeofday(&tv, NULL);
    srand48(tv.tv_usec + (tv.tv_sec << 16));
    srand(lrand48());
  }
  if (argc >= 2 && strcmp(argv[1], "--test-code") == 0) {
    generate_filters_brute_force();
  } else
    main_ellf(NULL);
  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)
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x10,%eax
cltq
add    %rax,%rdi
call   1090 <srand48@plt>
mov    $0x0,%al
call   1080 <lrand48@plt>
mov    %eax,%edi
call   1060 <srand@plt>
cmpl   $0x2,-0x8(%rbp)
jl     11e9 <main+0x79>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe32(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    11e9 <main+0x79>
mov    $0x0,%al
call   1030 <generate_filters_brute_force@plt>
jmp    11f2 <main+0x82>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <main_ellf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    0x8(%rsp),%eax
shl    $0x10,%eax
movslq %eax,%rdi
add    0x10(%rsp),%rdi
call   1090 <srand48@plt>
xor    %eax,%eax
call   1080 <lrand48@plt>
mov    %eax,%edi
call   1060 <srand@plt>
cmp    $0x2,%ebp
jl     11c3 <main+0x53>
mov    0x8(%rbx),%rdi
lea    0xe47(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     11cc <main+0x5c>
xor    %edi,%edi
call   1040 <main_ellf@plt>
jmp    11d3 <main+0x63>
xor    %eax,%eax
call   1030 <generate_filters_brute_force@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
@.str = [12 x i8] c"--test-code\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.timeval
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%9 = load i64, i64* %8
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%11 = load i32, i32* %10
%12 = shl i32 %11, 16
%13 = sext i32 %12 to i64
%14 = add nsw i64 %9, %13
%15 = call i32 @srand48(i64 %14)
%16 = call i32 (...) @lrand48()
%17 = call i32 @srand(i32 %16)
%18 = load i32, i32* %4
%19 = icmp sge i32 %18, 2
br i1 %19, label %20, label %28
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %20
%27 = call i32 (...) @generate_filters_brute_force()
br label %30
28: ; preds = %20, %2
%29 = call i32 @main_ellf(i32* null)
br label %30
30: ; preds = %28, %26
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
@.str = [12 x i8] c"--test-code\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
%7 = load i64, i64* %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = sext i32 %10 to i64
%12 = add nsw i64 %7, %11
%13 = tail call i32 @srand48(i64 %12)
%14 = tail call i32 (...) @lrand48()
%15 = tail call i32 @srand(i32 %14)
%16 = icmp sgt i32 %0, 1
br i1 %16, label %17, label %24
17: ; preds = %2
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = tail call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %17
%23 = tail call i32 (...) @generate_filters_brute_force()
br label %26
24: ; preds = %17, %2
%25 = tail call i32 @main_ellf(i32* null)
br label %26
26: ; preds = %24, %22
ret i32 0
}