#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ CRYPTO_mem_leaks_fp(int /*<<< orphan*/);
int /*<<< orphan*/ ENGINE_cleanup();
int /*<<< orphan*/ ENGINE_load_builtin_engines();
int /*<<< orphan*/ ENGINE_register_all_ciphers();
int /*<<< orphan*/ ENGINE_register_all_digests();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_remove_thread_state(int /*<<< orphan*/ *);
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ OpenSSL_add_all_ciphers();
int /*<<< orphan*/ OpenSSL_add_all_digests();
int atoi(char *);
int convert(unsigned char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ perror(char const *);
char *sstrsep(char **, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test_cipher(char *, unsigned char *, int, unsigned char *,
                               int, unsigned char *, int, unsigned char *, int,
                               int);
int /*<<< orphan*/ test_digest(char *, unsigned char *, int, unsigned char *,
                               int);
unsigned char *ustrsep(char **, char *);
int main(int argc, char **argv) {
  const char *szTestFile;
  FILE *f;
  if (argc != 2) {
    fprintf(stderr, "%s <test file>\n", argv[0]);
    exit(1);
  }
  szTestFile = argv[1];
  f = fopen(szTestFile, "r");
  if (!f) {
    perror(szTestFile);
    exit(2);
  }
  OpenSSL_add_all_ciphers();
  OpenSSL_add_all_digests();
  ENGINE_load_builtin_engines();
  ENGINE_register_all_ciphers();
  ENGINE_register_all_digests();
  for (;;) {
    char line[4096];
    char *p;
    char *cipher;
    unsigned char *iv, *key, *plaintext, *ciphertext;
    int encdec;
    int kn, in, pn, cn;
    if (!fgets((char *)line, sizeof line, f))
      break;
    if (line[0] == '#' || line[0] == '\n')
      continue;
    p = line;
    cipher = sstrsep(&p, ":");
    key = ustrsep(&p, ":");
    iv = ustrsep(&p, ":");
    plaintext = ustrsep(&p, ":");
    ciphertext = ustrsep(&p, ":");
    if (p[-1] == '\n') {
      p[-1] = '\0';
      encdec = -1;
    } else {
      encdec = atoi(sstrsep(&p, "\n"));
    }
    kn = convert(key);
    in = convert(iv);
    pn = convert(plaintext);
    cn = convert(ciphertext);
    if (!test_cipher(cipher, key, kn, iv, in, plaintext, pn, ciphertext, cn,
                     encdec) &&
        !test_digest(cipher, plaintext, pn, ciphertext, cn)) {
      fprintf(stderr, "Can't find %s\n", cipher);
      exit(3);
    }
  }
  fclose(f);
  ENGINE_cleanup();
  EVP_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_remove_thread_state(NULL);
  ERR_free_strings();
  CRYPTO_mem_leaks_fp(stderr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x1098,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x2,-0x10(%rbp)
je     12ba <main+0x4a>
mov    0x2d45(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xd55(%rip),%rsi
call   10d0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xd3f(%rip),%rsi
call   1130 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    12f8 <main+0x88>
mov    -0x20(%rbp),%rdi
call   1140 <perror@plt>
mov    $0x2,%edi
call   1170 <exit@plt>
mov    $0x0,%al
call   1120 <OpenSSL_add_all_ciphers@plt>
mov    $0x0,%al
call   10c0 <OpenSSL_add_all_digests@plt>
mov    $0x0,%al
call   1180 <ENGINE_load_builtin_engines@plt>
mov    $0x0,%al
call   1030 <ENGINE_register_all_ciphers@plt>
mov    $0x0,%al
call   1190 <ENGINE_register_all_digests@plt>
lea    -0x1030(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x1000,%esi
call   10b0 <fgets@plt>
cmp    $0x0,%eax
jne    133e <main+0xce>
jmp    1547 <main+0x2d7>
movsbl -0x1030(%rbp),%eax
cmp    $0x23,%eax
je     135e <main+0xee>
movsbl -0x1030(%rbp),%eax
cmp    $0xa,%eax
jne    1363 <main+0xf3>
jmp    131b <main+0xab>
lea    -0x1030(%rbp),%rax
mov    %rax,-0x1038(%rbp)
lea    -0x1038(%rbp),%rdi
lea    0xc93(%rip),%rsi
call   1100 <sstrsep@plt>
mov    %rax,-0x1040(%rbp)
lea    -0x1038(%rbp),%rdi
lea    0xc79(%rip),%rsi
call   1090 <ustrsep@plt>
mov    %rax,-0x1050(%rbp)
lea    -0x1038(%rbp),%rdi
lea    0xc5f(%rip),%rsi
call   1090 <ustrsep@plt>
mov    %rax,-0x1048(%rbp)
lea    -0x1038(%rbp),%rdi
lea    0xc45(%rip),%rsi
call   1090 <ustrsep@plt>
mov    %rax,-0x1058(%rbp)
lea    -0x1038(%rbp),%rdi
lea    0xc2b(%rip),%rsi
call   1090 <ustrsep@plt>
mov    %rax,-0x1060(%rbp)
mov    -0x1038(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0xa,%eax
jne    1421 <main+0x1b1>
mov    -0x1038(%rbp),%rax
movb   $0x0,-0x1(%rax)
movl   $0xffffffff,-0x1064(%rbp)
ff ff ff
jmp    1442 <main+0x1d2>
lea    -0x1038(%rbp),%rdi
lea    0xbdf(%rip),%rsi
call   1100 <sstrsep@plt>
mov    %rax,%rdi
call   1160 <atoi@plt>
mov    %eax,-0x1064(%rbp)
mov    -0x1050(%rbp),%rdi
call   1040 <convert@plt>
mov    %eax,-0x1068(%rbp)
mov    -0x1048(%rbp),%rdi
call   1040 <convert@plt>
mov    %eax,-0x106c(%rbp)
mov    -0x1058(%rbp),%rdi
call   1040 <convert@plt>
mov    %eax,-0x1070(%rbp)
mov    -0x1060(%rbp),%rdi
call   1040 <convert@plt>
mov    %eax,-0x1074(%rbp)
mov    -0x1040(%rbp),%rdi
mov    -0x1050(%rbp),%rsi
mov    -0x1068(%rbp),%edx
mov    -0x1048(%rbp),%rcx
mov    -0x106c(%rbp),%r8d
mov    -0x1058(%rbp),%r9
mov    -0x1070(%rbp),%ebx
mov    -0x1060(%rbp),%r11
mov    -0x1074(%rbp),%r10d
mov    -0x1064(%rbp),%eax
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1110 <test_cipher@plt>
cmp    $0x0,%eax
jne    1542 <main+0x2d2>
mov    -0x1040(%rbp),%rdi
mov    -0x1058(%rbp),%rsi
mov    -0x1070(%rbp),%edx
mov    -0x1060(%rbp),%rcx
mov    -0x1074(%rbp),%r8d
call   1150 <test_digest@plt>
cmp    $0x0,%eax
jne    1542 <main+0x2d2>
mov    0x2abd(%rip),%rax
mov    (%rax),%edi
mov    -0x1040(%rbp),%rdx
lea    0xae1(%rip),%rsi
call   10d0 <fprintf@plt>
mov    $0x3,%edi
call   1170 <exit@plt>
jmp    131b <main+0xab>
mov    -0x28(%rbp),%rdi
call   10a0 <fclose@plt>
mov    $0x0,%al
call   1080 <ENGINE_cleanup@plt>
mov    $0x0,%al
call   10e0 <EVP_cleanup@plt>
mov    $0x0,%al
call   1070 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <ERR_remove_thread_state@plt>
mov    $0x0,%al
call   10f0 <ERR_free_strings@plt>
mov    0x2a64(%rip),%rax
mov    (%rax),%edi
call   1060 <CRYPTO_mem_leaks_fp@plt>
xor    %eax,%eax
add    $0x1098,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1038,%rsp
cmp    $0x2,%edi
jne    14ad <main+0x23d>
mov    0x8(%rsi),%rbx
lea    0xd7b(%rip),%rsi
mov    %rbx,%rdi
call   1130 <fopen@plt>
test   %rax,%rax
je     14cf <main+0x25f>
mov    %rax,%r15
xor    %eax,%eax
call   1120 <OpenSSL_add_all_ciphers@plt>
xor    %eax,%eax
call   10c0 <OpenSSL_add_all_digests@plt>
xor    %eax,%eax
call   1180 <ENGINE_load_builtin_engines@plt>
xor    %eax,%eax
call   1030 <ENGINE_register_all_ciphers@plt>
xor    %eax,%eax
call   1190 <ENGINE_register_all_digests@plt>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r15,%rdx
call   10b0 <fgets@plt>
test   %eax,%eax
je     1460 <main+0x1f0>
lea    0x8(%rsp),%r13
mov    %r15,0x28(%rsp)
jmp    1318 <main+0xa8>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r15,%rdx
call   10b0 <fgets@plt>
test   %eax,%eax
je     1460 <main+0x1f0>
movzbl 0x30(%rsp),%eax
cmp    $0xa,%al
je     1300 <main+0x90>
cmp    $0x23,%al
je     1300 <main+0x90>
mov    %rbx,0x8(%rsp)
mov    %r13,%rdi
lea    0xcde(%rip),%rbx
mov    %rbx,%rsi
call   1100 <sstrsep@plt>
mov    %rax,%r14
mov    %r13,%rdi
mov    %rbx,%rsi
call   1090 <ustrsep@plt>
mov    %rax,%r15
mov    %r13,%rdi
mov    %rbx,%rsi
call   1090 <ustrsep@plt>
mov    %rax,%r12
mov    %r13,%rdi
mov    %rbx,%rsi
call   1090 <ustrsep@plt>
mov    %rax,%rbp
mov    %r13,%rdi
mov    %rbx,%rsi
call   1090 <ustrsep@plt>
mov    0x8(%rsp),%rcx
cmpb   $0xa,-0x1(%rcx)
mov    %r14,(%rsp)
mov    %rax,0x20(%rsp)
jne    1393 <main+0x123>
movb   $0x0,-0x1(%rcx)
mov    $0xffffffff,%eax
jmp    13aa <main+0x13a>
mov    %r13,%rdi
lea    0xc71(%rip),%rsi
call   1100 <sstrsep@plt>
mov    %rax,%rdi
call   1160 <atoi@plt>
mov    %rax,0x18(%rsp)
mov    %r15,%rdi
call   1040 <convert@plt>
mov    %eax,0x14(%rsp)
mov    %r12,%rdi
call   1040 <convert@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1040 <convert@plt>
mov    %rbp,%r14
mov    %eax,%ebp
mov    0x20(%rsp),%r13
mov    %r13,%rdi
call   1040 <convert@plt>
mov    %r12,%rcx
mov    %eax,%r12d
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    0x14(%rsp),%edx
mov    %ebx,%r8d
mov    %r14,%r9
push   0x18(%rsp)
push   %r12
push   %r13
push   %rbp
call   1110 <test_cipher@plt>
add    $0x20,%rsp
test   %eax,%eax
mov    0x28(%rsp),%r15
lea    0x30(%rsp),%rbx
lea    0x8(%rsp),%r13
jne    1300 <main+0x90>
mov    (%rsp),%rdi
mov    %r14,%rsi
mov    %ebp,%edx
mov    0x20(%rsp),%rcx
mov    %r12d,%r8d
call   1150 <test_digest@plt>
test   %eax,%eax
jne    1300 <main+0x90>
mov    0x2b9c(%rip),%rax
mov    (%rax),%edi
lea    0xbc7(%rip),%rsi
mov    (%rsp),%rdx
call   10d0 <fprintf@plt>
mov    $0x3,%edi
call   1170 <exit@plt>
mov    %r15,%rdi
call   10a0 <fclose@plt>
xor    %eax,%eax
call   1080 <ENGINE_cleanup@plt>
xor    %eax,%eax
call   10e0 <EVP_cleanup@plt>
xor    %eax,%eax
call   1070 <CRYPTO_cleanup_all_ex_data@plt>
xor    %edi,%edi
call   1050 <ERR_remove_thread_state@plt>
xor    %eax,%eax
call   10f0 <ERR_free_strings@plt>
mov    0x2b4e(%rip),%rax
mov    (%rax),%edi
call   1060 <CRYPTO_mem_leaks_fp@plt>
xor    %eax,%eax
add    $0x1038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b2c(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xb40(%rip),%rsi
call   10d0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    %rbx,%rdi
call   1140 <perror@plt>
mov    $0x2,%edi
call   1170 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"%s <test file>\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [2 x i8] c":\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [15 x i8] c"Can't find %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca [4096 x i8]
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%20 = load i32, i32* %4
%21 = icmp ne i32 %20, 2
br i1 %21, label %22, label %29
22: ; preds = %2
%23 = load i32, i32* @stderr
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %26)
%28 = call i32 @exit(i32 1)
unreachable
29: ; preds = %2
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
store i8* %32, i8** %6
%33 = load i8*, i8** %6
%34 = call i32* @fopen(i8* %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %34, i32** %7
%35 = load i32*, i32** %7
%36 = icmp ne i32* %35, null
br i1 %36, label %41, label %37
37: ; preds = %29
%38 = load i8*, i8** %6
%39 = call i32 @perror(i8* %38)
%40 = call i32 @exit(i32 2)
unreachable
41: ; preds = %29
%42 = call i32 (...) @OpenSSL_add_all_ciphers()
%43 = call i32 (...) @OpenSSL_add_all_digests()
%44 = call i32 (...) @ENGINE_load_builtin_engines()
%45 = call i32 (...) @ENGINE_register_all_ciphers()
%46 = call i32 (...) @ENGINE_register_all_digests()
br label %47
47: ; preds = %116, %63, %41
%48 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 0
%49 = load i32*, i32** %7
%50 = call i32 @fgets(i8* %48, i32 4096, i32* %49)
%51 = icmp ne i32 %50, 0
br i1 %51, label %53, label %52
52: ; preds = %47
br label %117
53: ; preds = %47
%54 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 0
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 35
br i1 %57, label %63, label %58
58: ; preds = %53
%59 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 0
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 10
br i1 %62, label %63, label %64
63: ; preds = %58, %53
br label %47
64: ; preds = %58
%65 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 0
store i8* %65, i8** %9
%66 = call i8* @sstrsep(i8** %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i8* %66, i8** %10
%67 = call i8* @ustrsep(i8** %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i8* %67, i8** %12
%68 = call i8* @ustrsep(i8** %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i8* %68, i8** %11
%69 = call i8* @ustrsep(i8** %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i8* %69, i8** %13
%70 = call i8* @ustrsep(i8** %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i8* %70, i8** %14
%71 = load i8*, i8** %9
%72 = getelementptr inbounds i8, i8* %71, i64 -1
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = icmp eq i32 %74, 10
br i1 %75, label %76, label %79
76: ; preds = %64
%77 = load i8*, i8** %9
%78 = getelementptr inbounds i8, i8* %77, i64 -1
store i8 0, i8* %78
store i32 -1, i32* %15
br label %82
79: ; preds = %64
%80 = call i8* @sstrsep(i8** %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%81 = call i32 @atoi(i8* %80)
store i32 %81, i32* %15
br label %82
82: ; preds = %79, %76
%83 = load i8*, i8** %12
%84 = call i32 @convert(i8* %83)
store i32 %84, i32* %16
%85 = load i8*, i8** %11
%86 = call i32 @convert(i8* %85)
store i32 %86, i32* %17
%87 = load i8*, i8** %13
%88 = call i32 @convert(i8* %87)
store i32 %88, i32* %18
%89 = load i8*, i8** %14
%90 = call i32 @convert(i8* %89)
store i32 %90, i32* %19
%91 = load i8*, i8** %10
%92 = load i8*, i8** %12
%93 = load i32, i32* %16
%94 = load i8*, i8** %11
%95 = load i32, i32* %17
%96 = load i8*, i8** %13
%97 = load i32, i32* %18
%98 = load i8*, i8** %14
%99 = load i32, i32* %19
%100 = load i32, i32* %15
%101 = call i32 @test_cipher(i8* %91, i8* %92, i32 %93, i8* %94, i32 %95, i8* %96, i32 %97, i8* %98, i32 %99, i32 %100)
%102 = icmp ne i32 %101, 0
br i1 %102, label %116, label %103
103: ; preds = %82
%104 = load i8*, i8** %10
%105 = load i8*, i8** %13
%106 = load i32, i32* %18
%107 = load i8*, i8** %14
%108 = load i32, i32* %19
%109 = call i32 @test_digest(i8* %104, i8* %105, i32 %106, i8* %107, i32 %108)
%110 = icmp ne i32 %109, 0
br i1 %110, label %116, label %111
111: ; preds = %103
%112 = load i32, i32* @stderr
%113 = load i8*, i8** %10
%114 = call i32 @fprintf(i32 %112, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* %113)
%115 = call i32 @exit(i32 3)
unreachable
116: ; preds = %103, %82
br label %47
117: ; preds = %52
%118 = load i32*, i32** %7
%119 = call i32 @fclose(i32* %118)
%120 = call i32 (...) @ENGINE_cleanup()
%121 = call i32 (...) @EVP_cleanup()
%122 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%123 = call i32 @ERR_remove_thread_state(i32* null)
%124 = call i32 (...) @ERR_free_strings()
%125 = load i32, i32* @stderr
%126 = call i32 @CRYPTO_mem_leaks_fp(i32 %125)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"%s <test file>\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [2 x i8] c":\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [15 x i8] c"Can't find %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [4096 x i8]
%4 = alloca i8*
%5 = icmp eq i32 %0, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = tail call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %19
16: ; preds = %11
%17 = tail call i32 @perror(i8* %13)
%18 = tail call i32 @exit(i32 2)
unreachable
19: ; preds = %11
%20 = tail call i32 (...) @OpenSSL_add_all_ciphers()
%21 = tail call i32 (...) @OpenSSL_add_all_digests()
%22 = tail call i32 (...) @ENGINE_load_builtin_engines()
%23 = tail call i32 (...) @ENGINE_register_all_ciphers()
%24 = tail call i32 (...) @ENGINE_register_all_digests()
%25 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%26 = bitcast i8** %4 to i8*
%27 = call i32 @fgets(i8* %25, i32 4096, i32* %14)
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %38
29: ; preds = %69, %19
%30 = call i32 @fclose(i32* %14)
%31 = call i32 (...) @ENGINE_cleanup()
%32 = call i32 (...) @EVP_cleanup()
%33 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%34 = call i32 @ERR_remove_thread_state(i32* null)
%35 = call i32 (...) @ERR_free_strings()
%36 = load i32, i32* @stderr
%37 = call i32 @CRYPTO_mem_leaks_fp(i32 %36)
ret i32 0
38: ; preds = %19, %69
%39 = load i8, i8* %25
switch i8 %39, label %40 [
i8 35, label %69
i8 10, label %69
]
40: ; preds = %38
store i8* %25, i8** %4
%41 = call i8* @sstrsep(i8** %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%42 = call i8* @ustrsep(i8** %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%43 = call i8* @ustrsep(i8** %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%44 = call i8* @ustrsep(i8** %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%45 = call i8* @ustrsep(i8** %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%46 = load i8*, i8** %4
%47 = getelementptr inbounds i8, i8* %46, i64 -1
%48 = load i8, i8* %47
%49 = icmp eq i8 %48, 10
br i1 %49, label %50, label %51
50: ; preds = %40
store i8 0, i8* %47
br label %54
51: ; preds = %40
%52 = call i8* @sstrsep(i8** %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%53 = call i32 @atoi(i8* %52)
br label %54
54: ; preds = %51, %50
%55 = phi i32 [ -1, %50 ], [ %53, %51 ]
%56 = call i32 @convert(i8* %42)
%57 = call i32 @convert(i8* %43)
%58 = call i32 @convert(i8* %44)
%59 = call i32 @convert(i8* %45)
%60 = call i32 @test_cipher(i8* %41, i8* %42, i32 %56, i8* %43, i32 %57, i8* %44, i32 %58, i8* %45, i32 %59, i32 %55)
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %69
62: ; preds = %54
%63 = call i32 @test_digest(i8* %41, i8* %44, i32 %58, i8* %45, i32 %59)
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %69
65: ; preds = %62
%66 = load i32, i32* @stderr
%67 = call i32 @fprintf(i32 %66, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* %41)
%68 = call i32 @exit(i32 3)
unreachable
69: ; preds = %54, %62, %38, %38
%70 = call i32 @fgets(i8* %25, i32 4096, i32* %14)
%71 = icmp eq i32 %70, 0
br i1 %71, label %29, label %38
}