#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 */
typedef scalar_t__ clock_t;

/* Variables and functions */
void *Abc_FrameGetGlobalFrame();
int /*<<< orphan*/ Abc_Start();
int /*<<< orphan*/ Abc_Stop();
scalar_t__ CLOCKS_PER_SEC;
scalar_t__ Cmd_CommandExecute(void *, char *);
scalar_t__ clock();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  int fUseResyn2 = 0;
  int fPrintStats = 1;
  int fVerify = 1;
  void *pAbc;
  char *pFileName;
  char Command[1000];
  clock_t clkRead, clkResyn, clkVer, clk;
  if (argc != 2) {
    printf("Wrong number of command-line arguments.\n");
    return 1;
  }
  pFileName = argv[1];
  Abc_Start();
  pAbc = Abc_FrameGetGlobalFrame();
  clk = clock();
  sprintf(Command, "read %s", pFileName);
  if (Cmd_CommandExecute(pAbc, Command)) {
    fprintf(stdout, "Cannot execute command \"%s\".\n", Command);
    return 1;
  }
  sprintf(Command, "balance");
  if (Cmd_CommandExecute(pAbc, Command)) {
    fprintf(stdout, "Cannot execute command \"%s\".\n", Command);
    return 1;
  }
  clkRead = clock() - clk;
  if (fPrintStats) {
    sprintf(Command, "print_stats");
    if (Cmd_CommandExecute(pAbc, Command)) {
      fprintf(stdout, "Cannot execute command \"%s\".\n", Command);
      return 1;
    }
  }
  clk = clock();
  if (fUseResyn2) {
    sprintf(Command,
            "balance; rewrite -l; refactor -l; balance; rewrite -l; rewrite "
            "-lz; balance; refactor -lz; rewrite -lz; balance");
    if (Cmd_CommandExecute(pAbc, Command)) {
      fprintf(stdout, "Cannot execute command \"%s\".\n", Command);
      return 1;
    }
  } else {
    sprintf(Command,
            "balance; rewrite -l; rewrite -lz; balance; rewrite -lz; balance");
    if (Cmd_CommandExecute(pAbc, Command)) {
      fprintf(stdout, "Cannot execute command \"%s\".\n", Command);
      return 1;
    }
  }
  clkResyn = clock() - clk;
  if (fPrintStats) {
    sprintf(Command, "print_stats");
    if (Cmd_CommandExecute(pAbc, Command)) {
      fprintf(stdout, "Cannot execute command \"%s\".\n", Command);
      return 1;
    }
  }
  sprintf(Command, "write_blif result.blif");
  if (Cmd_CommandExecute(pAbc, Command)) {
    fprintf(stdout, "Cannot execute command \"%s\".\n", Command);
    return 1;
  }
  clk = clock();
  if (fVerify) {
    sprintf(Command, "cec %s result.blif", pFileName);
    if (Cmd_CommandExecute(pAbc, Command)) {
      fprintf(stdout, "Cannot execute command \"%s\".\n", Command);
      return 1;
    }
  }
  clkVer = clock() - clk;
  printf("Reading = %6.2f sec   ", (float)(clkRead) / (float)(CLOCKS_PER_SEC));
  printf("Rewriting = %6.2f sec   ",
         (float)(clkResyn) / (float)(CLOCKS_PER_SEC));
  printf("Verification = %6.2f sec\n",
         (float)(clkVer) / (float)(CLOCKS_PER_SEC));
  Abc_Stop();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11d2 <main+0x52>
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15e9 <main+0x469>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   1060 <Abc_Start@plt>
mov    $0x0,%al
call   1030 <Abc_FrameGetGlobalFrame@plt>
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <clock@plt>
mov    %rax,-0x440(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xe19(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1090 <Cmd_CommandExecute@plt>
cmp    $0x0,%rax
je     1259 <main+0xd9>
mov    0x2da0(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xde9(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15e9 <main+0x469>
lea    -0x420(%rbp),%rdi
lea    0xe9c(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1090 <Cmd_CommandExecute@plt>
cmp    $0x0,%rax
je     12b0 <main+0x130>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xd92(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15e9 <main+0x469>
mov    $0x0,%al
call   1040 <clock@plt>
sub    -0x440(%rbp),%rax
mov    %rax,-0x428(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     132b <main+0x1ab>
lea    -0x420(%rbp),%rdi
lea    0xd72(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1090 <Cmd_CommandExecute@plt>
cmp    $0x0,%rax
je     1326 <main+0x1a6>
mov    0x2cd3(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xd1c(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15e9 <main+0x469>
jmp    132b <main+0x1ab>
mov    $0x0,%al
call   1040 <clock@plt>
mov    %rax,-0x440(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     139f <main+0x21f>
lea    -0x420(%rbp),%rdi
lea    0xd0a(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1090 <Cmd_CommandExecute@plt>
cmp    $0x0,%rax
je     139a <main+0x21a>
mov    0x2c5f(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xca8(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15e9 <main+0x469>
jmp    13fb <main+0x27b>
lea    -0x420(%rbp),%rdi
lea    0xd1e(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1090 <Cmd_CommandExecute@plt>
cmp    $0x0,%rax
je     13f6 <main+0x276>
mov    0x2c03(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xc4c(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15e9 <main+0x469>
jmp    13fb <main+0x27b>
mov    $0x0,%al
call   1040 <clock@plt>
sub    -0x440(%rbp),%rax
mov    %rax,-0x430(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1476 <main+0x2f6>
lea    -0x420(%rbp),%rdi
lea    0xc27(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1090 <Cmd_CommandExecute@plt>
cmp    $0x0,%rax
je     1471 <main+0x2f1>
mov    0x2b88(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xbd1(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15e9 <main+0x469>
jmp    1476 <main+0x2f6>
lea    -0x420(%rbp),%rdi
lea    0xc87(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1090 <Cmd_CommandExecute@plt>
cmp    $0x0,%rax
je     14cd <main+0x34d>
mov    0x2b2c(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xb75(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15e9 <main+0x469>
mov    $0x0,%al
call   1040 <clock@plt>
mov    %rax,-0x440(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1545 <main+0x3c5>
lea    -0x420(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xc2b(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1090 <Cmd_CommandExecute@plt>
cmp    $0x0,%rax
je     1540 <main+0x3c0>
mov    0x2ab9(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xb02(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15e9 <main+0x469>
jmp    1545 <main+0x3c5>
mov    $0x0,%al
call   1040 <clock@plt>
sub    -0x440(%rbp),%rax
mov    %rax,-0x438(%rbp)
cvtsi2ssq -0x428(%rbp),%xmm0
ff ff
mov    0x2a7e(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbb7(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
cvtsi2ssq -0x430(%rbp),%xmm0
ff ff
mov    0x2a53(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xba3(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
cvtsi2ssq -0x438(%rbp),%xmm0
ff ff
mov    0x2a28(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb91(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <Abc_Stop@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3f8,%rsp
cmp    $0x2,%edi
jne    134e <main+0x1be>
mov    0x8(%rsi),%r15
xor    %eax,%eax
call   1070 <Abc_Start@plt>
xor    %eax,%eax
call   1030 <Abc_FrameGetGlobalFrame@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%r14
lea    0xe30(%rip),%rsi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
movabs $0x65636e616c6162,%rax
mov    %rax,0x10(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%r12
movabs $0x74735f746e697270,%rbp
5f 73 74
mov    %rbp,0x10(%rsp)
movl   $0x737461,0x18(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%r13
movups 0xdcf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0xdd3(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0xdd7(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movups 0xddb(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
mov    %r13,0x8(%rsp)
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%r13
mov    %rbp,0x10(%rsp)
movl   $0x737461,0x18(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
movups 0xd9b(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x66696c622e746c,%rax
mov    %rax,0x1f(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,(%rsp)
lea    0xd78(%rip),%rsi
lea    0x10(%rsp),%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbx,%rdi
lea    0x10(%rsp),%rsi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
je     1373 <main+0x1e3>
mov    0x2c9f(%rip),%rax
mov    (%rax),%edi
lea    0xcc6(%rip),%rsi
lea    0x10(%rsp),%rdx
call   1090 <fprintf@plt>
jmp    135a <main+0x1ca>
lea    0xd91(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x3f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
sub    %r14,%r12
sub    0x8(%rsp),%r13
xor    %eax,%eax
call   1050 <clock@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r12,%xmm0
mov    0x2c57(%rip),%r14
cvtsi2ssq (%r14),%xmm1
mov    %rax,%rbx
sub    (%rsp),%rbx
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcf0(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r13,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ssq (%r14),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xce1(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rbx,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ssq (%r14),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcd4(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xor    %eax,%eax
call   1080 <Abc_Stop@plt>
jmp    135f <main+0x1cf>

LLVM IR (-O0):
@.str = [41 x i8] c"Wrong number of command-line arguments.\0A\00"
@.str.1 = [8 x i8] c"read %s\00"
@stdout = global i32 0
@.str.2 = [30 x i8] c"Cannot execute command \22%s\22.\0A\00"
@.str.3 = [8 x i8] c"balance\00"
@.str.4 = [12 x i8] c"print_stats\00"
@.str.5 = [112 x i8] c"balance; rewrite -l; refactor -l; balance; rewrite -l; rewrite -lz; balance; refactor -lz; rewrite -lz; balance\00"
@.str.6 = [64 x i8] c"balance; rewrite -l; rewrite -lz; balance; rewrite -lz; balance\00"
@.str.7 = [23 x i8] c"write_blif result.blif\00"
@.str.8 = [19 x i8] c"cec %s result.blif\00"
@.str.9 = [23 x i8] c"Reading = %6.2f sec \00"
@CLOCKS_PER_SEC = global i64 0
@.str.10 = [25 x i8] c"Rewriting = %6.2f sec \00"
@.str.11 = [26 x i8] c"Verification = %6.2f sec\0A\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
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca [1000 x i8]
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 1, i32* %7
store i32 1, i32* %8
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 2
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %167
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
store i8* %23, i8** %10
%24 = call i32 (...) @Abc_Start()
%25 = call i8* (...) @Abc_FrameGetGlobalFrame()
store i8* %25, i8** %9
%26 = call i64 (...) @clock()
store i64 %26, i64* %15
%27 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%28 = load i8*, i8** %10
%29 = call i32 (i8*, i8*, ...) @sprintf(i8* %27, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %28)
%30 = load i8*, i8** %9
%31 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%32 = call i64 @Cmd_CommandExecute(i8* %30, i8* %31)
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %38
34: ; preds = %20
%35 = load i32, i32* @stdout
%36 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%37 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %36)
store i32 1, i32* %3
br label %167
38: ; preds = %20
%39 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%40 = call i32 (i8*, i8*, ...) @sprintf(i8* %39, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%41 = load i8*, i8** %9
%42 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%43 = call i64 @Cmd_CommandExecute(i8* %41, i8* %42)
%44 = icmp ne i64 %43, 0
br i1 %44, label %45, label %49
45: ; preds = %38
%46 = load i32, i32* @stdout
%47 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%48 = call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %47)
store i32 1, i32* %3
br label %167
49: ; preds = %38
%50 = call i64 (...) @clock()
%51 = load i64, i64* %15
%52 = sub nsw i64 %50, %51
store i64 %52, i64* %12
%53 = load i32, i32* %7
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %67
55: ; preds = %49
%56 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%57 = call i32 (i8*, i8*, ...) @sprintf(i8* %56, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%58 = load i8*, i8** %9
%59 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%60 = call i64 @Cmd_CommandExecute(i8* %58, i8* %59)
%61 = icmp ne i64 %60, 0
br i1 %61, label %62, label %66
62: ; preds = %55
%63 = load i32, i32* @stdout
%64 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%65 = call i32 @fprintf(i32 %63, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %64)
store i32 1, i32* %3
br label %167
66: ; preds = %55
br label %67
67: ; preds = %66, %49
%68 = call i64 (...) @clock()
store i64 %68, i64* %15
%69 = load i32, i32* %6
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %83
71: ; preds = %67
%72 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%73 = call i32 (i8*, i8*, ...) @sprintf(i8* %72, i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.5, i64 0, i64 0))
%74 = load i8*, i8** %9
%75 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%76 = call i64 @Cmd_CommandExecute(i8* %74, i8* %75)
%77 = icmp ne i64 %76, 0
br i1 %77, label %78, label %82
78: ; preds = %71
%79 = load i32, i32* @stdout
%80 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%81 = call i32 @fprintf(i32 %79, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %80)
store i32 1, i32* %3
br label %167
82: ; preds = %71
br label %95
83: ; preds = %67
%84 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%85 = call i32 (i8*, i8*, ...) @sprintf(i8* %84, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.6, i64 0, i64 0))
%86 = load i8*, i8** %9
%87 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%88 = call i64 @Cmd_CommandExecute(i8* %86, i8* %87)
%89 = icmp ne i64 %88, 0
br i1 %89, label %90, label %94
90: ; preds = %83
%91 = load i32, i32* @stdout
%92 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%93 = call i32 @fprintf(i32 %91, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %92)
store i32 1, i32* %3
br label %167
94: ; preds = %83
br label %95
95: ; preds = %94, %82
%96 = call i64 (...) @clock()
%97 = load i64, i64* %15
%98 = sub nsw i64 %96, %97
store i64 %98, i64* %13
%99 = load i32, i32* %7
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %113
101: ; preds = %95
%102 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%103 = call i32 (i8*, i8*, ...) @sprintf(i8* %102, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%104 = load i8*, i8** %9
%105 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%106 = call i64 @Cmd_CommandExecute(i8* %104, i8* %105)
%107 = icmp ne i64 %106, 0
br i1 %107, label %108, label %112
108: ; preds = %101
%109 = load i32, i32* @stdout
%110 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%111 = call i32 @fprintf(i32 %109, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %110)
store i32 1, i32* %3
br label %167
112: ; preds = %101
br label %113
113: ; preds = %112, %95
%114 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%115 = call i32 (i8*, i8*, ...) @sprintf(i8* %114, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%116 = load i8*, i8** %9
%117 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%118 = call i64 @Cmd_CommandExecute(i8* %116, i8* %117)
%119 = icmp ne i64 %118, 0
br i1 %119, label %120, label %124
120: ; preds = %113
%121 = load i32, i32* @stdout
%122 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%123 = call i32 @fprintf(i32 %121, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %122)
store i32 1, i32* %3
br label %167
124: ; preds = %113
%125 = call i64 (...) @clock()
store i64 %125, i64* %15
%126 = load i32, i32* %8
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %141
128: ; preds = %124
%129 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%130 = load i8*, i8** %10
%131 = call i32 (i8*, i8*, ...) @sprintf(i8* %129, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8* %130)
%132 = load i8*, i8** %9
%133 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%134 = call i64 @Cmd_CommandExecute(i8* %132, i8* %133)
%135 = icmp ne i64 %134, 0
br i1 %135, label %136, label %140
136: ; preds = %128
%137 = load i32, i32* @stdout
%138 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%139 = call i32 @fprintf(i32 %137, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %138)
store i32 1, i32* %3
br label %167
140: ; preds = %128
br label %141
141: ; preds = %140, %124
%142 = call i64 (...) @clock()
%143 = load i64, i64* %15
%144 = sub nsw i64 %142, %143
store i64 %144, i64* %14
%145 = load i64, i64* %12
%146 = sitofp i64 %145 to float
%147 = load i64, i64* @CLOCKS_PER_SEC
%148 = sitofp i64 %147 to float
%149 = fdiv float %146, %148
%150 = fpext float %149 to double
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), double %150)
%152 = load i64, i64* %13
%153 = sitofp i64 %152 to float
%154 = load i64, i64* @CLOCKS_PER_SEC
%155 = sitofp i64 %154 to float
%156 = fdiv float %153, %155
%157 = fpext float %156 to double
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), double %157)
%159 = load i64, i64* %14
%160 = sitofp i64 %159 to float
%161 = load i64, i64* @CLOCKS_PER_SEC
%162 = sitofp i64 %161 to float
%163 = fdiv float %160, %162
%164 = fpext float %163 to double
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), double %164)
%166 = call i32 (...) @Abc_Stop()
store i32 0, i32* %3
br label %167
167: ; preds = %141, %136, %120, %108, %90, %78, %62, %45, %34, %18
%168 = load i32, i32* %3
ret i32 %168
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"read %s\00"
@stdout = global i32 0
@.str.2 = [30 x i8] c"Cannot execute command \22%s\22.\0A\00"
@.str.4 = [12 x i8] c"print_stats\00"
@.str.6 = [64 x i8] c"balance; rewrite -l; rewrite -lz; balance; rewrite -lz; balance\00"
@.str.7 = [23 x i8] c"write_blif result.blif\00"
@.str.8 = [19 x i8] c"cec %s result.blif\00"
@.str.9 = [23 x i8] c"Reading = %6.2f sec \00"
@CLOCKS_PER_SEC = global i64 0
@.str.10 = [25 x i8] c"Rewriting = %6.2f sec \00"
@.str.11 = [26 x i8] c"Verification = %6.2f sec\0A\00"
@str = [40 x i8] c"Wrong number of command-line arguments.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 2
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
br label %86
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 (...) @Abc_Start()
%12 = tail call i8* (...) @Abc_FrameGetGlobalFrame()
%13 = tail call i64 (...) @clock()
%14 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%15 = call i64 @Cmd_CommandExecute(i8* %12, i8* %4)
%16 = icmp eq i64 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %8
%18 = load i32, i32* @stdout
%19 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %86
20: ; preds = %8
%21 = bitcast [1000 x i8]* %3 to i64*
store i64 28538298379821410, i64* %21
%22 = call i64 @Cmd_CommandExecute(i8* %12, i8* %4)
%23 = icmp eq i64 %22, 0
br i1 %23, label %27, label %24
24: ; preds = %20
%25 = load i32, i32* @stdout
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %86
27: ; preds = %20
%28 = call i64 (...) @clock()
%29 = sub nsw i64 %28, %13
%30 = call i64 @Cmd_CommandExecute(i8* %12, i8* %4)
%31 = icmp eq i64 %30, 0
br i1 %31, label %35, label %32
32: ; preds = %27
%33 = load i32, i32* @stdout
%34 = call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %86
35: ; preds = %27
%36 = call i64 (...) @clock()
%37 = call i64 @Cmd_CommandExecute(i8* %12, i8* %4)
%38 = icmp eq i64 %37, 0
br i1 %38, label %42, label %39
39: ; preds = %35
%40 = load i32, i32* @stdout
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %86
42: ; preds = %35
%43 = call i64 (...) @clock()
%44 = sub nsw i64 %43, %36
%45 = call i64 @Cmd_CommandExecute(i8* %12, i8* %4)
%46 = icmp eq i64 %45, 0
br i1 %46, label %50, label %47
47: ; preds = %42
%48 = load i32, i32* @stdout
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %86
50: ; preds = %42
%51 = call i64 @Cmd_CommandExecute(i8* %12, i8* %4)
%52 = icmp eq i64 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %50
%54 = load i32, i32* @stdout
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %86
56: ; preds = %50
%57 = call i64 (...) @clock()
%58 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8* %10)
%59 = call i64 @Cmd_CommandExecute(i8* %12, i8* %4)
%60 = icmp eq i64 %59, 0
br i1 %60, label %64, label %61
61: ; preds = %56
%62 = load i32, i32* @stdout
%63 = call i32 @fprintf(i32 %62, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %86
64: ; preds = %56
%65 = call i64 (...) @clock()
%66 = sub nsw i64 %65, %57
%67 = sitofp i64 %29 to float
%68 = load i64, i64* @CLOCKS_PER_SEC
%69 = sitofp i64 %68 to float
%70 = fdiv float %67, %69
%71 = fpext float %70 to double
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), double %71)
%73 = sitofp i64 %44 to float
%74 = load i64, i64* @CLOCKS_PER_SEC
%75 = sitofp i64 %74 to float
%76 = fdiv float %73, %75
%77 = fpext float %76 to double
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), double %77)
%79 = sitofp i64 %66 to float
%80 = load i64, i64* @CLOCKS_PER_SEC
%81 = sitofp i64 %80 to float
%82 = fdiv float %79, %81
%83 = fpext float %82 to double
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), double %83)
%85 = call i32 (...) @Abc_Stop()
br label %86
86: ; preds = %64, %61, %53, %47, %39, %32, %24, %17, %6
%87 = phi i32 [ 1, %6 ], [ 1, %17 ], [ 1, %24 ], [ 1, %32 ], [ 1, %47 ], [ 1, %53 ], [ 1, %61 ], [ 0, %64 ], [ 1, %39 ]
ret i32 %87
}