#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*/ CSystem(char *);
int /*<<< orphan*/ Error();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  int Counter;
  char IndexSpecFileName[50], Command[256];
  if (argc != 2)
    Error();
  strcpy(IndexSpecFileName, argv[1]);
  fprintf(stderr, "Index Spec Compiler - Version 2.1\n");
  fprintf(stderr, "--------------------------\n");
  fprintf(stderr, "checking syntax.\n");
  fprintf(stderr, "   %s\n", IndexSpecFileName);
  sprintf(Command, "./IndexSpecParser < %s > isc.internal.in",
          IndexSpecFileName);
  CSystem(Command);
  strcat(IndexSpecFileName, ".internal");
  CSystem("sbcl --noinform --load FixLispInput");
  sprintf(Command, "mv isc.internal.out %s", IndexSpecFileName);
  CSystem(Command);
  CSystem("rm isc.*");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     118a <main+0x2a>
mov    $0x0,%al
call   1050 <Error@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
lea    0xe55(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%edi
lea    0xe61(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%edi
lea    0xe66(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2df9(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rdx
lea    0xe5d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
lea    -0x150(%rbp),%rdi
lea    -0x50(%rbp),%rdx
lea    0xe4b(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x150(%rbp),%rdi
call   1040 <CSystem@plt>
lea    -0x50(%rbp),%rdi
lea    0xe58(%rip),%rsi
call   1070 <strcat@plt>
lea    0xe56(%rip),%rdi
call   1040 <CSystem@plt>
lea    -0x150(%rbp),%rdi
lea    -0x50(%rbp),%rdx
lea    0xe63(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x150(%rbp),%rdi
call   1040 <CSystem@plt>
lea    0xe62(%rip),%rdi
call   1040 <CSystem@plt>
mov    -0x4(%rbp),%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x148,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
je     1179 <main+0x19>
xor    %eax,%eax
call   1050 <Error@plt>
mov    0x8(%rbx),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    0x2e51(%rip),%rbx
mov    (%rbx),%edi
lea    0xe68(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe7b(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe87(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe89(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe7f(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rdx
call   1080 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <CSystem@plt>
lea    0xe89(%rip),%rsi
mov    %r14,%rdi
call   1070 <strcat@plt>
lea    0xe84(%rip),%rdi
call   1040 <CSystem@plt>
lea    0xe9c(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1080 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <CSystem@plt>
lea    0xe99(%rip),%rdi
call   1040 <CSystem@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Index Spec Compiler - Version 2.1\0A\00"
@.str.1 = [28 x i8] c"--------------------------\0A\00"
@.str.2 = [18 x i8] c"checking syntax.\0A\00"
@.str.3 = [7 x i8] c" %s\0A\00"
@.str.4 = [41 x i8] c"./IndexSpecParser < %s > isc.internal.in\00"
@.str.5 = [10 x i8] c".internal\00"
@.str.6 = [36 x i8] c"sbcl --noinform --load FixLispInput\00"
@.str.7 = [23 x i8] c"mv isc.internal.out %s\00"
@.str.8 = [9 x i8] c"rm isc.*\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [50 x i8]
%8 = alloca [256 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (...) @Error()
br label %13
13: ; preds = %11, %2
%14 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @strcpy(i8* %14, i8* %17)
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %26)
%28 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%29 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%30 = call i32 @sprintf(i8* %28, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), i8* %29)
%31 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%32 = call i32 @CSystem(i8* %31)
%33 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%34 = call i32 @strcat(i8* %33, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%35 = call i32 @CSystem(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%36 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%37 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%38 = call i32 @sprintf(i8* %36, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i8* %37)
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%40 = call i32 @CSystem(i8* %39)
%41 = call i32 @CSystem(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%42 = load i32, i32* %3
ret i32 %42
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Index Spec Compiler - Version 2.1\0A\00"
@.str.1 = [28 x i8] c"--------------------------\0A\00"
@.str.2 = [18 x i8] c"checking syntax.\0A\00"
@.str.3 = [7 x i8] c" %s\0A\00"
@.str.4 = [41 x i8] c"./IndexSpecParser < %s > isc.internal.in\00"
@.str.5 = [10 x i8] c".internal\00"
@.str.6 = [36 x i8] c"sbcl --noinform --load FixLispInput\00"
@.str.7 = [23 x i8] c"mv isc.internal.out %s\00"
@.str.8 = [9 x i8] c"rm isc.*\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [50 x i8]
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = icmp eq i32 %0, 2
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 (...) @Error()
br label %10
10: ; preds = %8, %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @strcpy(i8* %5, i8* %12)
%14 = load i32, i32* @stderr
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %5)
%22 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), i8* %5)
%23 = call i32 @CSystem(i8* %6)
%24 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%25 = call i32 @CSystem(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%26 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%27 = call i32 @CSystem(i8* %6)
%28 = call i32 @CSystem(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}