#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 */
typedef int /*<<< orphan*/ __time_t;

/* Variables and functions */
int FileStat(char *, long long *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
             int *);
int _EncryptSSE_EncryptFile(char *, char *, char *);
int /*<<< orphan*/ _EncryptSSE_PropErrDesc();
char *_EncryptSSE_PropErrMsg();
int _Padmake_MakePadFile(char *, long long, int);
char *_Padmake_PropErrMsg();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  char SourceFile[257];
  char PadFile[257];
  char EncryptFile[257];
  long long FSIZE;
  __time_t Cdate;
  __time_t Mdate;
  int DirFlag;
  int ReturnCode;
  if (argc == 4) {
    strcpy(SourceFile, argv[1]);
    strcpy(PadFile, argv[2]);
    strcpy(EncryptFile, argv[3]);
    if (_EncryptSSE_EncryptFile(SourceFile, PadFile, EncryptFile) == -1) {
      printf("ERROR ENCRYPTING FILE: %s%s\n", _EncryptSSE_PropErrMsg(),
             _EncryptSSE_PropErrDesc());
      return -1;
    } else {
      printf("ENCRYPTED %s TO %s WITH %s\n", SourceFile, EncryptFile, PadFile);
      return 0;
    }
  } else if (argc == 3) {
    strcpy(SourceFile, argv[1]);
    strcpy(PadFile, argv[2]);
    strcpy(EncryptFile, SourceFile);
    strcat(EncryptFile, ".enc");
    if (_EncryptSSE_EncryptFile(SourceFile, PadFile, EncryptFile) == -1) {
      printf("ERROR ENCRYPTING FILE: %s%s\n", _EncryptSSE_PropErrMsg(),
             _EncryptSSE_PropErrDesc());
      return -1;
    } else {
      printf("ENCRYPTED %s TO %s WITH %s\n", SourceFile, EncryptFile, PadFile);
      return 0;
    }
  } else if (argc == 2) {
    strcpy(SourceFile, argv[1]);
    if (FileStat(argv[1], &FSIZE, &Cdate, &Mdate, &DirFlag) == -1) {
      printf("CANNOT STAT %s\n", argv[1]);
      return -1;
    }
    if (DirFlag == 1) {
      printf("ARG IS A DIR");
      return -1;
    }
    strcpy(PadFile, SourceFile);
    strcat(PadFile, ".pad");
    strcpy(EncryptFile, SourceFile);
    strcat(EncryptFile, ".enc");
    printf("SourceFile: %s\nPadFile: %s\nEncryptFile: %s\n", SourceFile,
           PadFile, EncryptFile);
    if (_Padmake_MakePadFile(PadFile, FSIZE, 1) == -1) {
      printf("ERRRO MAKING PAD: %s\n", _Padmake_PropErrMsg());
      return -1;
    }
    if (_EncryptSSE_EncryptFile(SourceFile, PadFile, EncryptFile) == -1) {
      printf("ERROR ENCRYPTING FILE: %s%s\n", _EncryptSSE_PropErrMsg(),
             _EncryptSSE_PropErrDesc());
      return -1;
    } else {
      printf("ENCRYPTED %s TO %s WITH %s\n", SourceFile, PadFile, EncryptFile);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x370,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
jne    1279 <main+0xe9>
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1050 <strcpy@plt>
lea    -0x230(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1050 <strcpy@plt>
lea    -0x340(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1050 <strcpy@plt>
lea    -0x120(%rbp),%rdi
lea    -0x230(%rbp),%rsi
lea    -0x340(%rbp),%rdx
call   1090 <_EncryptSSE_EncryptFile@plt>
cmp    $0xffffffff,%eax
jne    124a <main+0xba>
mov    $0x0,%al
call   1030 <_EncryptSSE_PropErrMsg@plt>
mov    %rax,-0x360(%rbp)
mov    $0x0,%al
call   1040 <_EncryptSSE_PropErrDesc@plt>
mov    -0x360(%rbp),%rsi
mov    %eax,%edx
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    153c <main+0x3ac>
lea    -0x120(%rbp),%rsi
lea    -0x340(%rbp),%rdx
lea    -0x230(%rbp),%rcx
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    153c <main+0x3ac>
cmpl   $0x3,-0x8(%rbp)
jne    135b <main+0x1cb>
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1050 <strcpy@plt>
lea    -0x230(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1050 <strcpy@plt>
lea    -0x340(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x340(%rbp),%rdi
lea    0xd6d(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0x120(%rbp),%rdi
lea    -0x230(%rbp),%rsi
lea    -0x340(%rbp),%rdx
call   1090 <_EncryptSSE_EncryptFile@plt>
cmp    $0xffffffff,%eax
jne    132c <main+0x19c>
mov    $0x0,%al
call   1030 <_EncryptSSE_PropErrMsg@plt>
mov    %rax,-0x368(%rbp)
mov    $0x0,%al
call   1040 <_EncryptSSE_PropErrDesc@plt>
mov    -0x368(%rbp),%rsi
mov    %eax,%edx
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    153c <main+0x3ac>
lea    -0x120(%rbp),%rsi
lea    -0x340(%rbp),%rdx
lea    -0x230(%rbp),%rcx
lea    0xcd5(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    153c <main+0x3ac>
cmpl   $0x2,-0x8(%rbp)
jne    152b <main+0x39b>
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1050 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x348(%rbp),%rsi
lea    -0x34c(%rbp),%rdx
lea    -0x350(%rbp),%rcx
lea    -0x354(%rbp),%r8
call   1080 <FileStat@plt>
cmp    $0xffffffff,%eax
jne    13cd <main+0x23d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xc84(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    153c <main+0x3ac>
cmpl   $0x1,-0x354(%rbp)
jne    13f4 <main+0x264>
lea    0xc6d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    153c <main+0x3ac>
lea    -0x230(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x230(%rbp),%rdi
lea    0xc46(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0x340(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x340(%rbp),%rdi
lea    0xbfe(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0x120(%rbp),%rsi
lea    -0x230(%rbp),%rdx
lea    -0x340(%rbp),%rcx
lea    0xc04(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x230(%rbp),%rdi
mov    -0x348(%rbp),%rsi
mov    $0x1,%edx
call   10a0 <_Padmake_MakePadFile@plt>
cmp    $0xffffffff,%eax
jne    14a8 <main+0x318>
mov    $0x0,%al
call   1060 <_Padmake_PropErrMsg@plt>
mov    %rax,%rsi
lea    0xbf7(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    153c <main+0x3ac>
lea    -0x120(%rbp),%rdi
lea    -0x230(%rbp),%rsi
lea    -0x340(%rbp),%rdx
call   1090 <_EncryptSSE_EncryptFile@plt>
cmp    $0xffffffff,%eax
jne    1503 <main+0x373>
mov    $0x0,%al
call   1030 <_EncryptSSE_PropErrMsg@plt>
mov    %rax,-0x370(%rbp)
mov    $0x0,%al
call   1040 <_EncryptSSE_PropErrDesc@plt>
mov    -0x370(%rbp),%rsi
mov    %eax,%edx
lea    0xb10(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    153c <main+0x3ac>
lea    -0x120(%rbp),%rsi
lea    -0x230(%rbp),%rdx
lea    -0x340(%rbp),%rcx
lea    0xafe(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    152b <main+0x39b>
jmp    1530 <main+0x3a0>
jmp    1535 <main+0x3a5>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x370,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x350,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
je     11fb <main+0x6b>
cmp    $0x3,%edi
je     124d <main+0xbd>
xor    %ebp,%ebp
cmp    $0x4,%edi
jne    13e1 <main+0x251>
mov    0x8(%rbx),%rsi
lea    0x20(%rsp),%r14
mov    %r14,%rdi
call   1050 <strcpy@plt>
mov    0x10(%rbx),%rsi
lea    0x240(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <strcpy@plt>
mov    0x18(%rbx),%rsi
lea    0x130(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strcpy@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
jmp    129a <main+0x10a>
mov    0x8(%rbx),%rsi
lea    0x20(%rsp),%rdi
call   1050 <strcpy@plt>
mov    0x8(%rbx),%rdi
lea    0x10(%rsp),%rsi
lea    0x1c(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0xc(%rsp),%r8
call   1080 <FileStat@plt>
cmp    $0xffffffff,%eax
je     12d5 <main+0x145>
cmpl   $0x1,0xc(%rsp)
jne    12e5 <main+0x155>
lea    0xe0d(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13dc <main+0x24c>
mov    0x8(%rbx),%rsi
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <strcpy@plt>
mov    0x10(%rbx),%rsi
lea    0x240(%rsp),%r14
mov    %r14,%rdi
call   1050 <strcpy@plt>
lea    0x130(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1050 <strcpy@plt>
lea    0xdad(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcat@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1090 <_EncryptSSE_EncryptFile@plt>
cmp    $0xffffffff,%eax
je     139e <main+0x20e>
lea    0xd6b(%rip),%rdi
xor    %ebp,%ebp
lea    0x20(%rsp),%rsi
lea    0x130(%rsp),%rdx
lea    0x240(%rsp),%rcx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13e1 <main+0x251>
mov    0x8(%rbx),%rsi
lea    0xd5e(%rip),%rdi
jmp    13d5 <main+0x245>
lea    0x240(%rsp),%rbx
lea    0x20(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcpy@plt>
lea    0xd57(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcat@plt>
lea    0x130(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
call   1050 <strcpy@plt>
lea    0xd13(%rip),%rsi
mov    %rbp,%rdi
call   10b0 <strcat@plt>
lea    0xd2b(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
call   10a0 <_Padmake_MakePadFile@plt>
cmp    $0xffffffff,%eax
je     13c4 <main+0x234>
lea    0x20(%rsp),%rdi
lea    0x240(%rsp),%rsi
lea    0x130(%rsp),%rdx
call   1090 <_EncryptSSE_EncryptFile@plt>
cmp    $0xffffffff,%eax
je     139e <main+0x20e>
lea    0xc9b(%rip),%rdi
xor    %ebp,%ebp
lea    0x20(%rsp),%rsi
lea    0x240(%rsp),%rdx
lea    0x130(%rsp),%rcx
jmp    12c9 <main+0x139>
xor    %eax,%eax
call   1030 <_EncryptSSE_PropErrMsg@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <_EncryptSSE_PropErrDesc@plt>
lea    0xc4a(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13dc <main+0x24c>
xor    %eax,%eax
call   1060 <_Padmake_PropErrMsg@plt>
lea    0xcba(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x350,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"ERROR ENCRYPTING FILE: %s%s\0A\00"
@.str.1 = [28 x i8] c"ENCRYPTED %s TO %s WITH %s\0A\00"
@.str.2 = [5 x i8] c".enc\00"
@.str.3 = [16 x i8] c"CANNOT STAT %s\0A\00"
@.str.4 = [13 x i8] c"ARG IS A DIR\00"
@.str.5 = [5 x i8] c".pad\00"
@.str.6 = [44 x i8] c"SourceFile: %s\0APadFile: %s\0AEncryptFile: %s\0A\00"
@.str.7 = [22 x i8] c"ERRRO MAKING PAD: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [257 x i8]
%7 = alloca [257 x i8]
%8 = alloca [257 x i8]
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 4
br i1 %15, label %16, label %46
16: ; preds = %2
%17 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = call i32 @strcpy(i8* %17, i8* %20)
%22 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
%26 = call i32 @strcpy(i8* %22, i8* %25)
%27 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 3
%30 = load i8*, i8** %29
%31 = call i32 @strcpy(i8* %27, i8* %30)
%32 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%33 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%34 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%35 = call i32 @_EncryptSSE_EncryptFile(i8* %32, i8* %33, i8* %34)
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %41
37: ; preds = %16
%38 = call i8* (...) @_EncryptSSE_PropErrMsg()
%39 = call i32 (...) @_EncryptSSE_PropErrDesc()
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %38, i32 %39)
store i32 -1, i32* %3
br label %144
41: ; preds = %16
%42 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%43 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%44 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %42, i8* %43, i8* %44)
store i32 0, i32* %3
br label %144
46: ; preds = %2
%47 = load i32, i32* %4
%48 = icmp eq i32 %47, 3
br i1 %48, label %49, label %79
49: ; preds = %46
%50 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 1
%53 = load i8*, i8** %52
%54 = call i32 @strcpy(i8* %50, i8* %53)
%55 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 2
%58 = load i8*, i8** %57
%59 = call i32 @strcpy(i8* %55, i8* %58)
%60 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%61 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%62 = call i32 @strcpy(i8* %60, i8* %61)
%63 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%64 = call i32 @strcat(i8* %63, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%65 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%66 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%67 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%68 = call i32 @_EncryptSSE_EncryptFile(i8* %65, i8* %66, i8* %67)
%69 = icmp eq i32 %68, -1
br i1 %69, label %70, label %74
70: ; preds = %49
%71 = call i8* (...) @_EncryptSSE_PropErrMsg()
%72 = call i32 (...) @_EncryptSSE_PropErrDesc()
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %71, i32 %72)
store i32 -1, i32* %3
br label %144
74: ; preds = %49
%75 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%76 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%77 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %75, i8* %76, i8* %77)
store i32 0, i32* %3
br label %144
79: ; preds = %46
%80 = load i32, i32* %4
%81 = icmp eq i32 %80, 2
br i1 %81, label %82, label %141
82: ; preds = %79
%83 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%84 = load i8**, i8*** %5
%85 = getelementptr inbounds i8*, i8** %84, i64 1
%86 = load i8*, i8** %85
%87 = call i32 @strcpy(i8* %83, i8* %86)
%88 = load i8**, i8*** %5
%89 = getelementptr inbounds i8*, i8** %88, i64 1
%90 = load i8*, i8** %89
%91 = call i32 @FileStat(i8* %90, i64* %9, i32* %10, i32* %11, i32* %12)
%92 = icmp eq i32 %91, -1
br i1 %92, label %93, label %98
93: ; preds = %82
%94 = load i8**, i8*** %5
%95 = getelementptr inbounds i8*, i8** %94, i64 1
%96 = load i8*, i8** %95
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %96)
store i32 -1, i32* %3
br label %144
98: ; preds = %82
%99 = load i32, i32* %12
%100 = icmp eq i32 %99, 1
br i1 %100, label %101, label %103
101: ; preds = %98
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
store i32 -1, i32* %3
br label %144
103: ; preds = %98
%104 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%105 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%106 = call i32 @strcpy(i8* %104, i8* %105)
%107 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%108 = call i32 @strcat(i8* %107, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%109 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%110 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%111 = call i32 @strcpy(i8* %109, i8* %110)
%112 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%113 = call i32 @strcat(i8* %112, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%114 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%115 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%116 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), i8* %114, i8* %115, i8* %116)
%118 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%119 = load i64, i64* %9
%120 = call i32 @_Padmake_MakePadFile(i8* %118, i64 %119, i32 1)
%121 = icmp eq i32 %120, -1
br i1 %121, label %122, label %125
122: ; preds = %103
%123 = call i8* (...) @_Padmake_PropErrMsg()
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i8* %123)
store i32 -1, i32* %3
br label %144
125: ; preds = %103
%126 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%127 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%128 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%129 = call i32 @_EncryptSSE_EncryptFile(i8* %126, i8* %127, i8* %128)
%130 = icmp eq i32 %129, -1
br i1 %130, label %131, label %135
131: ; preds = %125
%132 = call i8* (...) @_EncryptSSE_PropErrMsg()
%133 = call i32 (...) @_EncryptSSE_PropErrDesc()
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %132, i32 %133)
store i32 -1, i32* %3
br label %144
135: ; preds = %125
%136 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%137 = getelementptr inbounds [257 x i8], [257 x i8]* %7, i64 0, i64 0
%138 = getelementptr inbounds [257 x i8], [257 x i8]* %8, i64 0, i64 0
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %136, i8* %137, i8* %138)
br label %140
140: ; preds = %135
br label %141
141: ; preds = %140, %79
br label %142
142: ; preds = %141
br label %143
143: ; preds = %142
store i32 0, i32* %3
br label %144
144: ; preds = %143, %131, %122, %101, %93, %74, %70, %41, %37
%145 = load i32, i32* %3
ret i32 %145
}

LLVM IR (-O2):
@.str = [29 x i8] c"ERROR ENCRYPTING FILE: %s%s\0A\00"
@.str.1 = [28 x i8] c"ENCRYPTED %s TO %s WITH %s\0A\00"
@.str.2 = [5 x i8] c".enc\00"
@.str.3 = [16 x i8] c"CANNOT STAT %s\0A\00"
@.str.4 = [13 x i8] c"ARG IS A DIR\00"
@.str.5 = [5 x i8] c".pad\00"
@.str.6 = [44 x i8] c"SourceFile: %s\0APadFile: %s\0AEncryptFile: %s\0A\00"
@.str.7 = [22 x i8] c"ERRRO MAKING PAD: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [257 x i8]
%4 = alloca [257 x i8]
%5 = alloca [257 x i8]
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = getelementptr inbounds [257 x i8], [257 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 0
%12 = getelementptr inbounds [257 x i8], [257 x i8]* %5, i64 0, i64 0
%13 = bitcast i64* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = bitcast i32* %8 to i8*
%16 = bitcast i32* %9 to i8*
switch i32 %0, label %88 [
i32 4, label %17
i32 3, label %35
i32 2, label %52
]
17: ; preds = %2
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @strcpy(i8* %10, i8* %19)
%21 = getelementptr inbounds i8*, i8** %1, i64 2
%22 = load i8*, i8** %21
%23 = call i32 @strcpy(i8* %11, i8* %22)
%24 = getelementptr inbounds i8*, i8** %1, i64 3
%25 = load i8*, i8** %24
%26 = call i32 @strcpy(i8* %12, i8* %25)
%27 = call i32 @_EncryptSSE_EncryptFile(i8* %10, i8* %11, i8* %12)
%28 = icmp eq i32 %27, -1
br i1 %28, label %29, label %33
29: ; preds = %17
%30 = call i8* (...) @_EncryptSSE_PropErrMsg()
%31 = call i32 (...) @_EncryptSSE_PropErrDesc()
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %30, i32 %31)
br label %88
33: ; preds = %17
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %10, i8* %12, i8* %11)
br label %88
35: ; preds = %2
%36 = getelementptr inbounds i8*, i8** %1, i64 1
%37 = load i8*, i8** %36
%38 = call i32 @strcpy(i8* %10, i8* %37)
%39 = getelementptr inbounds i8*, i8** %1, i64 2
%40 = load i8*, i8** %39
%41 = call i32 @strcpy(i8* %11, i8* %40)
%42 = call i32 @strcpy(i8* %12, i8* %10)
%43 = call i32 @strcat(i8* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%44 = call i32 @_EncryptSSE_EncryptFile(i8* %10, i8* %11, i8* %12)
%45 = icmp eq i32 %44, -1
br i1 %45, label %46, label %50
46: ; preds = %35
%47 = call i8* (...) @_EncryptSSE_PropErrMsg()
%48 = call i32 (...) @_EncryptSSE_PropErrDesc()
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %47, i32 %48)
br label %88
50: ; preds = %35
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %10, i8* %12, i8* %11)
br label %88
52: ; preds = %2
%53 = getelementptr inbounds i8*, i8** %1, i64 1
%54 = load i8*, i8** %53
%55 = call i32 @strcpy(i8* %10, i8* %54)
%56 = load i8*, i8** %53
%57 = call i32 @FileStat(i8* %56, i64* %6, i32* %7, i32* %8, i32* %9)
%58 = icmp eq i32 %57, -1
br i1 %58, label %59, label %62
59: ; preds = %52
%60 = load i8*, i8** %53
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %60)
br label %88
62: ; preds = %52
%63 = load i32, i32* %9
%64 = icmp eq i32 %63, 1
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %88
67: ; preds = %62
%68 = call i32 @strcpy(i8* %11, i8* %10)
%69 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%70 = call i32 @strcpy(i8* %12, i8* %10)
%71 = call i32 @strcat(i8* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
%73 = load i64, i64* %6
%74 = call i32 @_Padmake_MakePadFile(i8* %11, i64 %73, i32 1)
%75 = icmp eq i32 %74, -1
br i1 %75, label %76, label %79
76: ; preds = %67
%77 = call i8* (...) @_Padmake_PropErrMsg()
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i8* %77)
br label %88
79: ; preds = %67
%80 = call i32 @_EncryptSSE_EncryptFile(i8* %10, i8* %11, i8* %12)
%81 = icmp eq i32 %80, -1
br i1 %81, label %82, label %86
82: ; preds = %79
%83 = call i8* (...) @_EncryptSSE_PropErrMsg()
%84 = call i32 (...) @_EncryptSSE_PropErrDesc()
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %83, i32 %84)
br label %88
86: ; preds = %79
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
br label %88
88: ; preds = %86, %2, %82, %76, %65, %59, %50, %46, %33, %29
%89 = phi i32 [ -1, %29 ], [ 0, %33 ], [ -1, %46 ], [ 0, %50 ], [ -1, %59 ], [ -1, %65 ], [ -1, %76 ], [ -1, %82 ], [ 0, %2 ], [ 0, %86 ]
ret i32 %89
}