#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*/ fileRead();
int /*<<< orphan*/ setenv(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main(int argc, char **argv) {
  system("/home/mazumdar/DRTSIM/drt-code/tregression.sh");
  setenv("DRT_DEBUG", "4", 0);
  system("./fib-tsu4 > output.txt");
  srand(time(0));
  fileRead();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe93(%rip),%rdi
call   1040 <system@plt>
lea    0xeb5(%rip),%rdi
lea    0xeb8(%rip),%rsi
xor    %edx,%edx
call   1030 <setenv@plt>
lea    0xeac(%rip),%rdi
call   1040 <system@plt>
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x0,%al
call   1050 <fileRead@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1040 <system@plt>
lea    0xeca(%rip),%rdi
lea    0xecd(%rip),%rsi
xor    %edx,%edx
call   1030 <setenv@plt>
lea    0xec1(%rip),%rdi
call   1040 <system@plt>
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   1050 <fileRead@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"/home/mazumdar/DRTSIM/drt-code/tregression.sh\00"
@.str.1 = [10 x i8] c"DRT_DEBUG\00"
@.str.2 = [2 x i8] c"4\00"
@.str.3 = [24 x i8] c"./fib-tsu4 > output.txt\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @system(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @setenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0)
%8 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @time(i32 0)
%10 = call i32 @srand(i32 %9)
%11 = call i32 (...) @fileRead()
ret i32 0
}

LLVM IR (-O2):
@.str = [46 x i8] c"/home/mazumdar/DRTSIM/drt-code/tregression.sh\00"
@.str.1 = [10 x i8] c"DRT_DEBUG\00"
@.str.2 = [2 x i8] c"4\00"
@.str.3 = [24 x i8] c"./fib-tsu4 > output.txt\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @system(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @setenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0)
%5 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @time(i32 0)
%7 = tail call i32 @srand(i32 %6)
%8 = tail call i32 (...) @fileRead()
ret i32 0
}