#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 */
void *Abc_FrameGetGlobalFrame();
int /*<<< orphan*/ Abc_Start();
int /*<<< orphan*/ Abc_Stop();
scalar_t__ CLOCKS_PER_SEC;
scalar_t__ Cmd_CommandExecute(void *, char *);
int 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];
  int 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    $0x430,%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    15dd <main+0x45d>
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    %eax,-0x430(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xe1a(%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     1258 <main+0xd8>
mov    0x2da1(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xdea(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15dd <main+0x45d>
lea    -0x420(%rbp),%rdi
lea    0xe9d(%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     12af <main+0x12f>
mov    0x2d4a(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xd93(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15dd <main+0x45d>
mov    $0x0,%al
call   1040 <clock@plt>
sub    -0x430(%rbp),%eax
mov    %eax,-0x424(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1328 <main+0x1a8>
lea    -0x420(%rbp),%rdi
lea    0xd75(%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     1323 <main+0x1a3>
mov    0x2cd6(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xd1f(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15dd <main+0x45d>
jmp    1328 <main+0x1a8>
mov    $0x0,%al
call   1040 <clock@plt>
mov    %eax,-0x430(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     139b <main+0x21b>
lea    -0x420(%rbp),%rdi
lea    0xd0e(%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     1396 <main+0x216>
mov    0x2c63(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xcac(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15dd <main+0x45d>
jmp    13f7 <main+0x277>
lea    -0x420(%rbp),%rdi
lea    0xd22(%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     13f2 <main+0x272>
mov    0x2c07(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xc50(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15dd <main+0x45d>
jmp    13f7 <main+0x277>
mov    $0x0,%al
call   1040 <clock@plt>
sub    -0x430(%rbp),%eax
mov    %eax,-0x428(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1470 <main+0x2f0>
lea    -0x420(%rbp),%rdi
lea    0xc2d(%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     146b <main+0x2eb>
mov    0x2b8e(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xbd7(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15dd <main+0x45d>
jmp    1470 <main+0x2f0>
lea    -0x420(%rbp),%rdi
lea    0xc8d(%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     14c7 <main+0x347>
mov    0x2b32(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xb7b(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15dd <main+0x45d>
mov    $0x0,%al
call   1040 <clock@plt>
mov    %eax,-0x430(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     153e <main+0x3be>
lea    -0x420(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xc32(%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     1539 <main+0x3b9>
mov    0x2ac0(%rip),%rax
mov    (%rax),%edi
lea    -0x420(%rbp),%rdx
lea    0xb09(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15dd <main+0x45d>
jmp    153e <main+0x3be>
mov    $0x0,%al
call   1040 <clock@plt>
sub    -0x430(%rbp),%eax
mov    %eax,-0x42c(%rbp)
cvtsi2ssl -0x424(%rbp),%xmm0
ff
mov    0x2a88(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbc1(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
cvtsi2ssl -0x428(%rbp),%xmm0
ff
mov    0x2a5e(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbae(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
cvtsi2ssl -0x42c(%rbp),%xmm0
ff
mov    0x2a34(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb9d(%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    $0x430,%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),%r12
xor    %eax,%eax
call   1070 <Abc_Start@plt>
xor    %eax,%eax
call   1030 <Abc_FrameGetGlobalFrame@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1050 <clock@plt>
mov    %eax,%r14d
lea    0xe30(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%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    %rbp,%rdi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
xor    %eax,%eax
call   1050 <clock@plt>
mov    %eax,%r15d
movabs $0x74735f746e697270,%rbx
5f 73 74
mov    %rbx,0x10(%rsp)
movl   $0x737461,0x18(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbp,%rdi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
xor    %eax,%eax
call   1050 <clock@plt>
mov    %eax,%r13d
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    %rbp,%rdi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
mov    %r13d,0xc(%rsp)
xor    %eax,%eax
call   1050 <clock@plt>
mov    %eax,%r13d
mov    %rbx,0x10(%rsp)
movl   $0x737461,0x18(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbp,%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    %rbp,%rdi
call   10a0 <Cmd_CommandExecute@plt>
test   %rax,%rax
jne    1332 <main+0x1a2>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <clock@plt>
mov    %eax,0x8(%rsp)
lea    0xd78(%rip),%rsi
lea    0x10(%rsp),%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbp,%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,%ebx
mov    %ebx,%eax
add    $0x3f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
sub    %r14d,%r15d
sub    0xc(%rsp),%r13d
xor    %eax,%eax
call   1050 <clock@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r15d,%xmm0
mov    0x2c57(%rip),%r14
cvtsi2ssq (%r14),%xmm1
mov    %eax,%ebp
sub    0x8(%rsp),%ebp
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcf1(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r13d,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ssq (%r14),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xce2(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ssq (%r14),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcd6(%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 i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
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 i32 (...) @clock()
store i32 %26, i32* %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 i32 (...) @clock()
%51 = load i32, i32* %15
%52 = sub nsw i32 %50, %51
store i32 %52, i32* %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 i32 (...) @clock()
store i32 %68, i32* %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 i32 (...) @clock()
%97 = load i32, i32* %15
%98 = sub nsw i32 %96, %97
store i32 %98, i32* %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 i32 (...) @clock()
store i32 %125, i32* %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 i32 (...) @clock()
%143 = load i32, i32* %15
%144 = sub nsw i32 %142, %143
store i32 %144, i32* %14
%145 = load i32, i32* %12
%146 = sitofp i32 %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 i32, i32* %13
%153 = sitofp i32 %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 i32, i32* %14
%160 = sitofp i32 %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 i32 (...) @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 i32 (...) @clock()
%29 = sub nsw i32 %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 i32 (...) @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 i32 (...) @clock()
%44 = sub nsw i32 %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 i32 (...) @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 i32 (...) @clock()
%66 = sub nsw i32 %65, %57
%67 = sitofp i32 %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 i32 %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 i32 %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
}