#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ init();
int /*<<< orphan*/ parser(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc == 2) {
    printf("Running parser for file name %s\n", argv[1]);
    init();
    parser(argv[1]);
  } else {
    fprintf(stderr, "Enter file name at execution");
  }
  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)
cmpl   $0x2,-0x8(%rbp)
jne    118d <main+0x4d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <init@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <parser@plt>
jmp    11a2 <main+0x62>
mov    0x2e4c(%rip),%rax
mov    (%rax),%edi
lea    0xe84(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jne    116b <main+0x2b>
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1060 <init@plt>
mov    0x8(%rbx),%rdi
call   1050 <parser@plt>
jmp    1180 <main+0x40>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Running parser for file name %s\0A\00"
@stderr = global i32 0
@.str.1 = [29 x i8] c"Enter file name at execution\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 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %18
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 (...) @init()
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @parser(i8* %16)
br label %21
18: ; preds = %2
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %18, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Running parser for file name %s\0A\00"
@stderr = global i32 0
@.str.1 = [29 x i8] c"Enter file name at execution\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 (...) @init()
%9 = load i8*, i8** %5
%10 = tail call i32 @parser(i8* %9)
br label %14
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %11, %4
ret i32 0
}