#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*/ alignment(char *, char *);
scalar_t__ existFile(char *);
int /*<<< orphan*/ free(char *);
scalar_t__ isDNAFileExtension(char *);
scalar_t__ isValidFilePath(char *);
scalar_t__ isValidNucleotideContents(char *);
int /*<<< orphan*/ printf(char *);
char *readFile(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  readFile(argv[1]);
  if (argc == 3) {
    if (existFile(argv[1]) && existFile(argv[2]) && isValidFilePath(argv[1]) &&
        isValidFilePath(argv[2])) {
      if (isDNAFileExtension(argv[1]) && isDNAFileExtension(argv[2])) {
        if (!strcmp(argv[1], argv[2])) {
          printf("please, select different files.\n");
        } else {
          char *secuenceA = readFile(argv[1]);
          char *secuenceB = readFile(argv[2]);
          if (secuenceA && secuenceB) {
            if (isValidNucleotideContents(secuenceA) &&
                isValidNucleotideContents(secuenceB)) {
              alignment(secuenceA, secuenceB);
            } else
              printf("the file(s) contents is invalid.\n");
          } else
            printf("error on file(s) reading.\n");
          free(secuenceA);
          free(secuenceB);
        }
      } else
        printf("Invalid file(s) extension, the correctly extension is "
               "\".dna\".\n");
    } else
      printf("Invalid file path(s). Remember, the file paths can only contain "
             "alphanumerics characters, one dot and spaces.\n");
  } else {
    printf("You need pass two arguments");
    if (argc > 3)
      printf(" only");
    printf(".\n");
  }
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <readFile@plt>
cmpl   $0x3,-0x8(%rbp)
jne    133c <main+0x1ac>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <existFile@plt>
cmp    $0x0,%rax
je     132b <main+0x19b>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <existFile@plt>
cmp    $0x0,%rax
je     132b <main+0x19b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <isValidFilePath@plt>
cmp    $0x0,%rax
je     132b <main+0x19b>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <isValidFilePath@plt>
cmp    $0x0,%rax
je     132b <main+0x19b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10b0 <isDNAFileExtension@plt>
cmp    $0x0,%rax
je     131a <main+0x18a>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10b0 <isDNAFileExtension@plt>
cmp    $0x0,%rax
je     131a <main+0x18a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1276 <main+0xe6>
lea    0xd94(%rip),%rdi
call   1050 <printf@plt>
jmp    1315 <main+0x185>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <readFile@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <readFile@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     12f7 <main+0x167>
cmpq   $0x0,-0x20(%rbp)
je     12f7 <main+0x167>
mov    -0x18(%rbp),%rdi
call   1040 <isValidNucleotideContents@plt>
cmp    $0x0,%rax
je     12e6 <main+0x156>
mov    -0x20(%rbp),%rdi
call   1040 <isValidNucleotideContents@plt>
cmp    $0x0,%rax
je     12e6 <main+0x156>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1090 <alignment@plt>
jmp    12f2 <main+0x162>
lea    0xd34(%rip),%rdi
call   1050 <printf@plt>
jmp    1303 <main+0x173>
lea    0xd45(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
jmp    1326 <main+0x196>
lea    0xd3d(%rip),%rdi
call   1050 <printf@plt>
jmp    1337 <main+0x1a7>
lea    0xd6b(%rip),%rdi
call   1050 <printf@plt>
jmp    136a <main+0x1da>
lea    0xdc9(%rip),%rdi
call   1050 <printf@plt>
cmpl   $0x3,-0x8(%rbp)
jle    135e <main+0x1ce>
lea    0xdcf(%rip),%rdi
call   1050 <printf@plt>
lea    0xd35(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
call   10b0 <readFile@plt>
cmp    $0x3,%ebp
jne    1287 <main+0xe7>
mov    0x8(%rbx),%rdi
call   1080 <existFile@plt>
test   %rax,%rax
je     12ad <main+0x10d>
mov    0x10(%rbx),%rdi
call   1080 <existFile@plt>
test   %rax,%rax
je     12ad <main+0x10d>
mov    0x8(%rbx),%rdi
call   1070 <isValidFilePath@plt>
test   %rax,%rax
je     12ad <main+0x10d>
mov    0x10(%rbx),%rdi
call   1070 <isValidFilePath@plt>
test   %rax,%rax
je     12ad <main+0x10d>
mov    0x8(%rbx),%rdi
call   10c0 <isDNAFileExtension@plt>
test   %rax,%rax
je     12c0 <main+0x120>
mov    0x10(%rbx),%rdi
call   10c0 <isDNAFileExtension@plt>
test   %rax,%rax
je     12c0 <main+0x120>
mov    0x8(%rbx),%rbp
mov    0x10(%rbx),%rsi
mov    %rbp,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     12c9 <main+0x129>
mov    %rbp,%rdi
call   10b0 <readFile@plt>
mov    %rax,%r14
mov    0x10(%rbx),%rdi
call   10b0 <readFile@plt>
mov    %rax,%rbx
test   %r14,%r14
je     12d2 <main+0x132>
test   %rbx,%rbx
je     12d2 <main+0x132>
mov    %r14,%rdi
call   1040 <isValidNucleotideContents@plt>
test   %rax,%rax
je     12db <main+0x13b>
mov    %rbx,%rdi
call   1040 <isValidNucleotideContents@plt>
test   %rax,%rax
je     12db <main+0x13b>
mov    %r14,%rdi
mov    %rbx,%rsi
call   10a0 <alignment@plt>
jmp    12e7 <main+0x147>
lea    0xd72(%rip),%rdi
call   1060 <printf@plt>
cmp    $0x4,%ebp
jl     12a4 <main+0x104>
lea    0xd7d(%rip),%rdi
call   1060 <printf@plt>
lea    0xe21(%rip),%rdi
jmp    12b4 <main+0x114>
lea    0xd6e(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xdc9(%rip),%rdi
jmp    12b4 <main+0x114>
lea    0xdfe(%rip),%rdi
jmp    12b4 <main+0x114>
lea    0xe15(%rip),%rdi
jmp    12e2 <main+0x142>
lea    0xe26(%rip),%rdi
call   1050 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
jmp    12b9 <main+0x119>

LLVM IR (-O0):
@.str = [33 x i8] c"please, select different files.\0A\00"
@.str.1 = [34 x i8] c"the file(s) contents is invalid.\0A\00"
@.str.2 = [27 x i8] c"error on file(s) reading.\0A\00"
@.str.3 = [63 x i8] c"Invalid file(s) extension, the correctly extension is \22.dna\22.\0A\00"
@.str.4 = [111 x i8] c"Invalid file path(s). Remember, the file paths can only contain alphanumerics characters, one dot and spaces.\0A\00"
@.str.5 = [28 x i8] c"You need pass two arguments\00"
@.str.6 = [6 x i8] c" only\00"
@.str.7 = [3 x i8] c".\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i8* @readFile(i8* %10)
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 3
br i1 %13, label %14, label %104
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i64 @existFile(i8* %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %101
20: ; preds = %14
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
%24 = call i64 @existFile(i8* %23)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %101
26: ; preds = %20
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i64 @isValidFilePath(i8* %29)
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %101
32: ; preds = %26
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 2
%35 = load i8*, i8** %34
%36 = call i64 @isValidFilePath(i8* %35)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %101
38: ; preds = %32
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = call i64 @isDNAFileExtension(i8* %41)
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %98
44: ; preds = %38
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 2
%47 = load i8*, i8** %46
%48 = call i64 @isDNAFileExtension(i8* %47)
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %98
50: ; preds = %44
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 1
%53 = load i8*, i8** %52
%54 = load i8**, i8*** %5
%55 = getelementptr inbounds i8*, i8** %54, i64 2
%56 = load i8*, i8** %55
%57 = call i32 @strcmp(i8* %53, i8* %56)
%58 = icmp ne i32 %57, 0
br i1 %58, label %61, label %59
59: ; preds = %50
%60 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %97
61: ; preds = %50
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 1
%64 = load i8*, i8** %63
%65 = call i8* @readFile(i8* %64)
store i8* %65, i8** %6
%66 = load i8**, i8*** %5
%67 = getelementptr inbounds i8*, i8** %66, i64 2
%68 = load i8*, i8** %67
%69 = call i8* @readFile(i8* %68)
store i8* %69, i8** %7
%70 = load i8*, i8** %6
%71 = icmp ne i8* %70, null
br i1 %71, label %72, label %90
72: ; preds = %61
%73 = load i8*, i8** %7
%74 = icmp ne i8* %73, null
br i1 %74, label %75, label %90
75: ; preds = %72
%76 = load i8*, i8** %6
%77 = call i64 @isValidNucleotideContents(i8* %76)
%78 = icmp ne i64 %77, 0
br i1 %78, label %79, label %87
79: ; preds = %75
%80 = load i8*, i8** %7
%81 = call i64 @isValidNucleotideContents(i8* %80)
%82 = icmp ne i64 %81, 0
br i1 %82, label %83, label %87
83: ; preds = %79
%84 = load i8*, i8** %6
%85 = load i8*, i8** %7
%86 = call i32 @alignment(i8* %84, i8* %85)
br label %89
87: ; preds = %79, %75
%88 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %89
89: ; preds = %87, %83
br label %92
90: ; preds = %72, %61
%91 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %92
92: ; preds = %90, %89
%93 = load i8*, i8** %6
%94 = call i32 @free(i8* %93)
%95 = load i8*, i8** %7
%96 = call i32 @free(i8* %95)
br label %97
97: ; preds = %92, %59
br label %100
98: ; preds = %44, %38
%99 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
br label %100
100: ; preds = %98, %97
br label %103
101: ; preds = %32, %26, %20, %14
%102 = call i32 @printf(i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.4, i64 0, i64 0))
br label %103
103: ; preds = %101, %100
br label %112
104: ; preds = %2
%105 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%106 = load i32, i32* %4
%107 = icmp sgt i32 %106, 3
br i1 %107, label %108, label %110
108: ; preds = %104
%109 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %110
110: ; preds = %108, %104
%111 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %112
112: ; preds = %110, %103
ret i32 0
}

LLVM IR (-O2):
@.str.5 = [28 x i8] c"You need pass two arguments\00"
@.str.6 = [6 x i8] c" only\00"
@str = [2 x i8] c".\00"
@str.8 = [110 x i8] c"Invalid file path(s). Remember, the file paths can only contain alphanumerics characters, one dot and spaces.\00"
@str.9 = [62 x i8] c"Invalid file(s) extension, the correctly extension is \22.dna\22.\00"
@str.10 = [32 x i8] c"please, select different files.\00"
@str.11 = [26 x i8] c"error on file(s) reading.\00"
@str.12 = [33 x i8] c"the file(s) contents is invalid.\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 i8* @readFile(i8* %4)
%6 = icmp eq i32 %0, 3
br i1 %6, label %7, label %65
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = tail call i64 @existFile(i8* %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %63, label %11
11: ; preds = %7
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i64 @existFile(i8* %13)
%15 = icmp eq i64 %14, 0
br i1 %15, label %63, label %16
16: ; preds = %11
%17 = load i8*, i8** %3
%18 = tail call i64 @isValidFilePath(i8* %17)
%19 = icmp eq i64 %18, 0
br i1 %19, label %63, label %20
20: ; preds = %16
%21 = load i8*, i8** %12
%22 = tail call i64 @isValidFilePath(i8* %21)
%23 = icmp eq i64 %22, 0
br i1 %23, label %63, label %24
24: ; preds = %20
%25 = load i8*, i8** %3
%26 = tail call i64 @isDNAFileExtension(i8* %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %61, label %28
28: ; preds = %24
%29 = load i8*, i8** %12
%30 = tail call i64 @isDNAFileExtension(i8* %29)
%31 = icmp eq i64 %30, 0
br i1 %31, label %61, label %32
32: ; preds = %28
%33 = load i8*, i8** %3
%34 = load i8*, i8** %12
%35 = tail call i32 @strcmp(i8* dereferenceable(1) %33, i8* dereferenceable(1) %34)
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %32
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.10, i64 0, i64 0))
br label %72
39: ; preds = %32
%40 = tail call i8* @readFile(i8* %33)
%41 = load i8*, i8** %12
%42 = tail call i8* @readFile(i8* %41)
%43 = icmp ne i8* %40, null
%44 = icmp ne i8* %42, null
%45 = select i1 %43, i1 %44, i1 false
br i1 %45, label %46, label %56
46: ; preds = %39
%47 = tail call i64 @isValidNucleotideContents(i8* %40)
%48 = icmp eq i64 %47, 0
br i1 %48, label %54, label %49
49: ; preds = %46
%50 = tail call i64 @isValidNucleotideContents(i8* %42)
%51 = icmp eq i64 %50, 0
br i1 %51, label %54, label %52
52: ; preds = %49
%53 = tail call i32 @alignment(i8* %40, i8* %42)
br label %58
54: ; preds = %49, %46
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.12, i64 0, i64 0))
br label %58
56: ; preds = %39
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
br label %58
58: ; preds = %52, %54, %56
%59 = tail call i32 @free(i8* %40)
%60 = tail call i32 @free(i8* %42)
br label %72
61: ; preds = %28, %24
%62 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.9, i64 0, i64 0))
br label %72
63: ; preds = %20, %16, %11, %7
%64 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([110 x i8], [110 x i8]* @str.8, i64 0, i64 0))
br label %72
65: ; preds = %2
%66 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%67 = icmp sgt i32 %0, 3
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %70
70: ; preds = %68, %65
%71 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
br label %72
72: ; preds = %63, %37, %58, %61, %70
ret i32 0
}