#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*/ printf(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
scalar_t__ test_1();
scalar_t__ test_GF_Enumeration();
scalar_t__ test_GF_functionality();
scalar_t__ test_OrePoly_Arith();
scalar_t__ test_SecretKey_Validity();
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  if (test_1() == 0)
    printf("test_1 failed.\n");
  else
    printf("test_1 succeeded.\n");
  if (test_GF_functionality() == 0)
    printf("test_GF_functionality failed.\n");
  else
    printf("test_GF_functionality succeeded.\n");
  if (test_OrePoly_Arith() == 0)
    printf("test_OrePoly_Arith failed.\n");
  else
    printf("test_OrePoly_Arith succeeded.\n");
  if (test_SecretKey_Validity() == 0)
    printf("test_SecretKey_Validity failed.\n");
  else
    printf("test_SecretKey_Validity succeeded.\n");
  if (test_GF_Enumeration() == 0)
    printf("test_GF_Enumeration failed.\n");
  else
    printf("test_GF_Enumeration succeeded.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
mov    $0x0,%al
call   1040 <test_1@plt>
cmp    $0x0,%rax
jne    11c1 <main+0x41>
lea    0xe49(%rip),%rdi
call   1050 <printf@plt>
jmp    11cd <main+0x4d>
lea    0xe48(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10a0 <test_GF_functionality@plt>
cmp    $0x0,%rax
jne    11ef <main+0x6f>
lea    0xe3e(%rip),%rdi
call   1050 <printf@plt>
jmp    11fb <main+0x7b>
lea    0xe4c(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <test_OrePoly_Arith@plt>
cmp    $0x0,%rax
jne    121d <main+0x9d>
lea    0xe51(%rip),%rdi
call   1050 <printf@plt>
jmp    1229 <main+0xa9>
lea    0xe5c(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <test_SecretKey_Validity@plt>
cmp    $0x0,%rax
jne    124b <main+0xcb>
lea    0xe5e(%rip),%rdi
call   1050 <printf@plt>
jmp    1257 <main+0xd7>
lea    0xe6e(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <test_GF_Enumeration@plt>
cmp    $0x0,%rax
jne    1279 <main+0xf9>
lea    0xe75(%rip),%rdi
call   1050 <printf@plt>
jmp    1285 <main+0x105>
lea    0xe81(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
xor    %eax,%eax
call   1040 <test_1@plt>
test   %rax,%rax
lea    0xf68(%rip),%rax
lea    0xe59(%rip),%rdi
cmove  %rax,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   10a0 <test_GF_functionality@plt>
test   %rax,%rax
lea    0xf29(%rip),%rax
lea    0xe4a(%rip),%rdi
cmove  %rax,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1030 <test_OrePoly_Arith@plt>
test   %rax,%rax
lea    0xeed(%rip),%rax
lea    0xe4a(%rip),%rdi
cmove  %rax,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1060 <test_SecretKey_Validity@plt>
test   %rax,%rax
lea    0xeac(%rip),%rax
lea    0xe47(%rip),%rdi
cmove  %rax,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1090 <test_GF_Enumeration@plt>
test   %rax,%rax
lea    0xe6f(%rip),%rax
lea    0xe49(%rip),%rdi
cmove  %rax,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"test_1 failed.\0A\00"
@.str.1 = [19 x i8] c"test_1 succeeded.\0A\00"
@.str.2 = [31 x i8] c"test_GF_functionality failed.\0A\00"
@.str.3 = [34 x i8] c"test_GF_functionality succeeded.\0A\00"
@.str.4 = [28 x i8] c"test_OrePoly_Arith failed.\0A\00"
@.str.5 = [31 x i8] c"test_OrePoly_Arith succeeded.\0A\00"
@.str.6 = [33 x i8] c"test_SecretKey_Validity failed.\0A\00"
@.str.7 = [36 x i8] c"test_SecretKey_Validity succeeded.\0A\00"
@.str.8 = [29 x i8] c"test_GF_Enumeration failed.\0A\00"
@.str.9 = [32 x i8] c"test_GF_Enumeration succeeded.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i64 (...) @test_1()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = call i64 (...) @test_GF_functionality()
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %17
15: ; preds = %10
%16 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
%18 = call i64 (...) @test_OrePoly_Arith()
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %24
22: ; preds = %17
%23 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
%25 = call i64 (...) @test_SecretKey_Validity()
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
br label %31
29: ; preds = %24
%30 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
br label %31
31: ; preds = %29, %27
%32 = call i64 (...) @test_GF_Enumeration()
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
br label %38
36: ; preds = %31
%37 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0))
br label %38
38: ; preds = %36, %34
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"test_1 succeeded.\00"
@str.10 = [33 x i8] c"test_GF_functionality succeeded.\00"
@str.11 = [30 x i8] c"test_OrePoly_Arith succeeded.\00"
@str.12 = [35 x i8] c"test_SecretKey_Validity succeeded.\00"
@str.13 = [31 x i8] c"test_GF_Enumeration succeeded.\00"
@str.14 = [28 x i8] c"test_GF_Enumeration failed.\00"
@str.15 = [32 x i8] c"test_SecretKey_Validity failed.\00"
@str.16 = [27 x i8] c"test_OrePoly_Arith failed.\00"
@str.17 = [30 x i8] c"test_GF_functionality failed.\00"
@str.18 = [15 x i8] c"test_1 failed.\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i64 (...) @test_1()
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.18, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
%7 = tail call i64 (...) @test_GF_functionality()
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str.17, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.10, i64 0, i64 0)
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
%11 = tail call i64 (...) @test_OrePoly_Arith()
%12 = icmp eq i64 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.16, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str.11, i64 0, i64 0)
%14 = tail call i32 @puts(i8* dereferenceable(1) %13)
%15 = tail call i64 (...) @test_SecretKey_Validity()
%16 = icmp eq i64 %15, 0
%17 = select i1 %16, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.15, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str.12, i64 0, i64 0)
%18 = tail call i32 @puts(i8* dereferenceable(1) %17)
%19 = tail call i64 (...) @test_GF_Enumeration()
%20 = icmp eq i64 %19, 0
%21 = select i1 %20, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.14, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @str.13, i64 0, i64 0)
%22 = tail call i32 @puts(i8* dereferenceable(1) %21)
ret i32 0
}