#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*/ constant_test(int);
int /*<<< orphan*/ decreasing_test(int);
int /*<<< orphan*/ increasing_test(int);
int /*<<< orphan*/ random_test(int);
int main(void) {
  int n;
  random_test(0);
  random_test(1);
  random_test(2);
  random_test(3);
  random_test(3);
  random_test(3);
  random_test(4);
  random_test(5);
  constant_test(100);
  constant_test(100);
  increasing_test(100);
  decreasing_test(100);
  for (n = 0; n < 30; n++) {
    random_test(100);
    random_test(200);
    random_test(1000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1060 <random_test@plt>
mov    $0x1,%edi
call   1060 <random_test@plt>
mov    $0x2,%edi
call   1060 <random_test@plt>
mov    $0x3,%edi
call   1060 <random_test@plt>
mov    $0x3,%edi
call   1060 <random_test@plt>
mov    $0x3,%edi
call   1060 <random_test@plt>
mov    $0x4,%edi
call   1060 <random_test@plt>
mov    $0x5,%edi
call   1060 <random_test@plt>
mov    $0x64,%edi
call   1030 <constant_test@plt>
mov    $0x64,%edi
call   1030 <constant_test@plt>
mov    $0x64,%edi
call   1040 <increasing_test@plt>
mov    $0x64,%edi
call   1050 <decreasing_test@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1e,-0x8(%rbp)
jge    1201 <main+0xc1>
mov    $0x64,%edi
call   1060 <random_test@plt>
mov    $0xc8,%edi
call   1060 <random_test@plt>
mov    $0x3e8,%edi
call   1060 <random_test@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11cb <main+0x8b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1060 <random_test@plt>
mov    $0x1,%edi
call   1060 <random_test@plt>
mov    $0x2,%edi
call   1060 <random_test@plt>
mov    $0x3,%edi
call   1060 <random_test@plt>
mov    $0x3,%edi
call   1060 <random_test@plt>
mov    $0x3,%edi
call   1060 <random_test@plt>
mov    $0x4,%edi
call   1060 <random_test@plt>
mov    $0x5,%edi
call   1060 <random_test@plt>
mov    $0x64,%edi
call   1030 <constant_test@plt>
mov    $0x64,%edi
call   1030 <constant_test@plt>
mov    $0x64,%edi
call   1040 <increasing_test@plt>
mov    $0x64,%edi
call   1050 <decreasing_test@plt>
mov    $0x1e,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x64,%edi
call   1060 <random_test@plt>
mov    $0xc8,%edi
call   1060 <random_test@plt>
mov    $0x3e8,%edi
call   1060 <random_test@plt>
add    $0xffffffff,%ebx
jne    11c0 <main+0x80>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @random_test(i32 0)
%4 = call i32 @random_test(i32 1)
%5 = call i32 @random_test(i32 2)
%6 = call i32 @random_test(i32 3)
%7 = call i32 @random_test(i32 3)
%8 = call i32 @random_test(i32 3)
%9 = call i32 @random_test(i32 4)
%10 = call i32 @random_test(i32 5)
%11 = call i32 @constant_test(i32 100)
%12 = call i32 @constant_test(i32 100)
%13 = call i32 @increasing_test(i32 100)
%14 = call i32 @decreasing_test(i32 100)
store i32 0, i32* %2
br label %15
15: ; preds = %22, %0
%16 = load i32, i32* %2
%17 = icmp slt i32 %16, 30
br i1 %17, label %18, label %25
18: ; preds = %15
%19 = call i32 @random_test(i32 100)
%20 = call i32 @random_test(i32 200)
%21 = call i32 @random_test(i32 1000)
br label %22
22: ; preds = %18
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %15
25: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @random_test(i32 0)
%2 = tail call i32 @random_test(i32 1)
%3 = tail call i32 @random_test(i32 2)
%4 = tail call i32 @random_test(i32 3)
%5 = tail call i32 @random_test(i32 3)
%6 = tail call i32 @random_test(i32 3)
%7 = tail call i32 @random_test(i32 4)
%8 = tail call i32 @random_test(i32 5)
%9 = tail call i32 @constant_test(i32 100)
%10 = tail call i32 @constant_test(i32 100)
%11 = tail call i32 @increasing_test(i32 100)
%12 = tail call i32 @decreasing_test(i32 100)
br label %13
13: ; preds = %0, %13
%14 = phi i32 [ 0, %0 ], [ %18, %13 ]
%15 = tail call i32 @random_test(i32 100)
%16 = tail call i32 @random_test(i32 200)
%17 = tail call i32 @random_test(i32 1000)
%18 = add nuw nsw i32 %14, 1
%19 = icmp eq i32 %18, 30
br i1 %19, label %20, label %13
20: ; preds = %13
ret i32 0
}