#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 */
scalar_t__ checkArgument(int, char const *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(char **);
int /*<<< orphan*/ initProcessor(char **);
int /*<<< orphan*/ printf(char *);
char **readFile(char const *);
int /*<<< orphan*/ startParsing(char const *);
int main(int argc, const char *argv[]) {
  if (checkArgument(argc, argv[1]) == 0) {
    startParsing(argv[1]);
    char **captionLines = readFile(argv[1]);
    if (!captionLines) {
      printf("File read failuer it didin't make wordsList \n");
      exit(1);
    } else {
      initProcessor(captionLines);
    }
    free(captionLines);
    captionLines = NULL;
  } else {
    printf("Input arguments error program finish. \n");
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1040 <checkArgument@plt>
cmp    $0x0,%rax
jne    11fe <main+0x8e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <startParsing@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <readFile@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11df <main+0x6f>
lea    0xe30(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x18(%rbp),%rdi
call   1070 <initProcessor@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x18(%rbp)
jmp    1214 <main+0xa4>
lea    0xe29(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
call   1040 <checkArgument@plt>
test   %rax,%rax
jne    11b0 <main+0x40>
mov    0x8(%rbx),%rdi
call   1060 <startParsing@plt>
mov    0x8(%rbx),%rdi
call   1090 <readFile@plt>
test   %rax,%rax
je     11b9 <main+0x49>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <initProcessor@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xe49(%rip),%rdi
jmp    11c0 <main+0x50>
lea    0xe67(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"File read failuer it didin't make wordsList \0A\00"
@.str.1 = [40 x i8] c"Input arguments error program finish. \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i64 @checkArgument(i32 %7, i8* %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %33
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @startParsing(i8* %16)
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = call i8** @readFile(i8* %20)
store i8** %21, i8*** %6
%22 = load i8**, i8*** %6
%23 = icmp ne i8** %22, null
br i1 %23, label %27, label %24
24: ; preds = %13
%25 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%26 = call i32 @exit(i32 1)
unreachable
27: ; preds = %13
%28 = load i8**, i8*** %6
%29 = call i32 @initProcessor(i8** %28)
br label %30
30: ; preds = %27
%31 = load i8**, i8*** %6
%32 = call i32 @free(i8** %31)
store i8** null, i8*** %6
br label %36
33: ; preds = %2
%34 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%35 = call i32 @exit(i32 1)
unreachable
36: ; preds = %30
ret i32 0
}

LLVM IR (-O2):
@str = [39 x i8] c"Input arguments error program finish. \00"
@str.2 = [45 x i8] c"File read failuer it didin't make wordsList \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @checkArgument(i32 %0, i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = tail call i32 @startParsing(i8* %8)
%10 = load i8*, i8** %3
%11 = tail call i8** @readFile(i8* %10)
%12 = icmp eq i8** %11, null
br i1 %12, label %13, label %16
13: ; preds = %7
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.2, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %7
%17 = tail call i32 @initProcessor(i8** %11)
%18 = tail call i32 @free(i8** %11)
ret i32 0
19: ; preds = %2
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%21 = tail call i32 @exit(i32 1)
unreachable
}