#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*/ X509;
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ CMS_ContentInfo;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BIO_new_file(char *, char *);
int /*<<< orphan*/ BIO_reset(int /*<<< orphan*/ *);
int /*<<< orphan*/ CMS_ContentInfo_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ CMS_decrypt(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ ERR_print_errors_fp(int /*<<< orphan*/);
int /*<<< orphan*/ EVP_PKEY_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int /*<<< orphan*/ *PEM_read_bio_CMS(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                     int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ *PEM_read_bio_PrivateKey(int /*<<< orphan*/ *,
                                            int /*<<< orphan*/ *,
                                            int /*<<< orphan*/,
                                            int /*<<< orphan*/ *);
int /*<<< orphan*/ *PEM_read_bio_X509(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  BIO *in = NULL, *out = NULL, *tbio = NULL, *dcont = NULL;
  X509 *rcert = NULL;
  EVP_PKEY *rkey = NULL;
  CMS_ContentInfo *cms = NULL;
  int ret = 1;
  OpenSSL_add_all_algorithms();
  ERR_load_crypto_strings();
  tbio = BIO_new_file("signer.pem", "r");
  if (!tbio)
    goto err;
  rcert = PEM_read_bio_X509(tbio, NULL, 0, NULL);
  BIO_reset(tbio);
  rkey = PEM_read_bio_PrivateKey(tbio, NULL, 0, NULL);
  if (!rcert || !rkey)
    goto err;
  in = BIO_new_file("smencr.pem", "r");
  if (!in)
    goto err;
  cms = PEM_read_bio_CMS(in, NULL, 0, NULL);
  if (!cms)
    goto err;
  dcont = BIO_new_file("smencr.out", "rb");
  if (!in)
    goto err;
  out = BIO_new_file("encrout.txt", "w");
  if (!out)
    goto err;
  if (!CMS_decrypt(cms, rkey, rcert, dcont, out, 0))
    goto err;
  ret = 0;
err:
  if (ret) {
    fprintf(stderr, "Error Decrypting Data\n");
    ERR_print_errors_fp(stderr);
  }
  if (cms)
    CMS_ContentInfo_free(cms);
  if (rcert)
    X509_free(rcert);
  if (rkey)
    EVP_PKEY_free(rkey);
  if (in)
    BIO_free(in);
  if (out)
    BIO_free(out);
  if (tbio)
    BIO_free(tbio);
  if (dcont)
    BIO_free(dcont);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    $0x0,%al
call   1070 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   10a0 <ERR_load_crypto_strings@plt>
lea    0xdb6(%rip),%rdi
lea    0xdba(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    126a <main+0x8a>
jmp    1386 <main+0x1a6>
mov    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
xor    %edx,%edx
mov    %rcx,%rsi
call   10d0 <PEM_read_bio_X509@plt>
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
call   10b0 <BIO_reset@plt>
mov    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
xor    %edx,%edx
mov    %rcx,%rsi
call   10c0 <PEM_read_bio_PrivateKey@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     12b5 <main+0xd5>
cmpq   $0x0,-0x40(%rbp)
jne    12ba <main+0xda>
jmp    1386 <main+0x1a6>
lea    0xd4c(%rip),%rdi
lea    0xd43(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    12e1 <main+0x101>
jmp    1386 <main+0x1a6>
mov    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
xor    %edx,%edx
mov    %rcx,%rsi
call   1040 <PEM_read_bio_CMS@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    1307 <main+0x127>
jmp    1386 <main+0x1a6>
lea    0xd0a(%rip),%rdi
lea    0xd0e(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    132e <main+0x14e>
jmp    1386 <main+0x1a6>
lea    0xcf1(%rip),%rdi
lea    0xcf6(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1355 <main+0x175>
jmp    1386 <main+0x1a6>
mov    -0x48(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x20(%rbp),%r8
xor    %r9d,%r9d
call   1030 <CMS_decrypt@plt>
cmp    $0x0,%eax
jne    137f <main+0x19f>
jmp    1386 <main+0x1a6>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     13b3 <main+0x1d3>
mov    0x2c49(%rip),%rax
mov    (%rax),%edi
lea    0xc94(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2c34(%rip),%rax
mov    (%rax),%edi
call   10e0 <ERR_print_errors_fp@plt>
cmpq   $0x0,-0x48(%rbp)
je     13c7 <main+0x1e7>
mov    -0x48(%rbp),%rdi
call   1100 <CMS_ContentInfo_free@plt>
cmpq   $0x0,-0x38(%rbp)
je     13db <main+0x1fb>
mov    -0x38(%rbp),%rdi
call   1090 <X509_free@plt>
cmpq   $0x0,-0x40(%rbp)
je     13ef <main+0x20f>
mov    -0x40(%rbp),%rdi
call   1050 <EVP_PKEY_free@plt>
cmpq   $0x0,-0x18(%rbp)
je     1403 <main+0x223>
mov    -0x18(%rbp),%rdi
call   1080 <BIO_free@plt>
cmpq   $0x0,-0x20(%rbp)
je     1417 <main+0x237>
mov    -0x20(%rbp),%rdi
call   1080 <BIO_free@plt>
cmpq   $0x0,-0x28(%rbp)
je     142b <main+0x24b>
mov    -0x28(%rbp),%rdi
call   1080 <BIO_free@plt>
cmpq   $0x0,-0x30(%rbp)
je     143f <main+0x25f>
mov    -0x30(%rbp),%rdi
call   1080 <BIO_free@plt>
mov    -0x4c(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
xor    %r12d,%r12d
xor    %eax,%eax
call   1070 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
call   10a0 <ERR_load_crypto_strings@plt>
lea    0xdfa(%rip),%rdi
lea    0xdfe(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,%rbx
test   %rax,%rax
je     12f2 <main+0x112>
xor    %r12d,%r12d
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   10d0 <PEM_read_bio_X509@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   10b0 <BIO_reset@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   10c0 <PEM_read_bio_PrivateKey@plt>
test   %r14,%r14
mov    %rax,0x10(%rsp)
je     1301 <main+0x121>
test   %rax,%rax
je     1301 <main+0x121>
lea    0xda7(%rip),%rdi
lea    0xd9e(%rip),%rsi
call   10f0 <BIO_new_file@plt>
test   %rax,%rax
je     12fe <main+0x11e>
mov    %rax,%r15
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <PEM_read_bio_CMS@plt>
test   %rax,%rax
je     13a1 <main+0x1c1>
mov    %rax,%r12
lea    0xd79(%rip),%rdi
lea    0xd7d(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,0x8(%rsp)
lea    0xd6f(%rip),%rdi
lea    0xd74(%rip),%rsi
call   10f0 <BIO_new_file@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     13ab <main+0x1cb>
mov    %rax,%r13
mov    %r12,%rdi
mov    0x10(%rsp),%rsi
mov    %r14,%rdx
mov    0x8(%rsp),%rcx
mov    %rax,%r8
xor    %r9d,%r9d
call   1030 <CMS_decrypt@plt>
test   %eax,%eax
jne    1336 <main+0x156>
jmp    130e <main+0x12e>
xor    %eax,%eax
mov    %rax,0x10(%rsp)
xor    %r14d,%r14d
jmp    1301 <main+0x121>
xor    %r12d,%r12d
xor    %eax,%eax
mov    %rax,0x8(%rsp)
xor    %r13d,%r13d
xor    %r15d,%r15d
mov    0x2ccb(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xd15(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x0(%rbp),%edi
call   10e0 <ERR_print_errors_fp@plt>
mov    $0x1,%ebp
test   %r12,%r12
je     133e <main+0x15e>
mov    %r12,%rdi
call   1100 <CMS_ContentInfo_free@plt>
test   %r14,%r14
je     134b <main+0x16b>
mov    %r14,%rdi
call   1090 <X509_free@plt>
mov    0x10(%rsp),%rdi
test   %rdi,%rdi
je     135a <main+0x17a>
call   1050 <EVP_PKEY_free@plt>
test   %r15,%r15
je     1367 <main+0x187>
mov    %r15,%rdi
call   1080 <BIO_free@plt>
test   %r13,%r13
je     1374 <main+0x194>
mov    %r13,%rdi
call   1080 <BIO_free@plt>
test   %rbx,%rbx
je     1381 <main+0x1a1>
mov    %rbx,%rdi
call   1080 <BIO_free@plt>
mov    0x8(%rsp),%rdi
test   %rdi,%rdi
je     1390 <main+0x1b0>
call   1080 <BIO_free@plt>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
mov    %rax,0x8(%rsp)
xor    %r12d,%r12d
xor    %r13d,%r13d
jmp    130e <main+0x12e>

LLVM IR (-O0):
@.str = [11 x i8] c"signer.pem\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"smencr.pem\00"
@.str.3 = [11 x i8] c"smencr.out\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [12 x i8] c"encrout.txt\00"
@.str.6 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.7 = [23 x i8] c"Error Decrypting Data\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%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
store i32* null, i32** %6
store i32* null, i32** %7
store i32* null, i32** %8
store i32* null, i32** %9
store i32* null, i32** %10
store i32* null, i32** %11
store i32* null, i32** %12
store i32 1, i32* %13
%14 = call i32 (...) @OpenSSL_add_all_algorithms()
%15 = call i32 (...) @ERR_load_crypto_strings()
%16 = call i32* @BIO_new_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %16, i32** %8
%17 = load i32*, i32** %8
%18 = icmp ne i32* %17, null
br i1 %18, label %20, label %19
19: ; preds = %2
br label %64
20: ; preds = %2
%21 = load i32*, i32** %8
%22 = call i32* @PEM_read_bio_X509(i32* %21, i32* null, i32 0, i32* null)
store i32* %22, i32** %10
%23 = load i32*, i32** %8
%24 = call i32 @BIO_reset(i32* %23)
%25 = load i32*, i32** %8
%26 = call i32* @PEM_read_bio_PrivateKey(i32* %25, i32* null, i32 0, i32* null)
store i32* %26, i32** %11
%27 = load i32*, i32** %10
%28 = icmp ne i32* %27, null
br i1 %28, label %29, label %32
29: ; preds = %20
%30 = load i32*, i32** %11
%31 = icmp ne i32* %30, null
br i1 %31, label %33, label %32
32: ; preds = %29, %20
br label %64
33: ; preds = %29
%34 = call i32* @BIO_new_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %34, i32** %6
%35 = load i32*, i32** %6
%36 = icmp ne i32* %35, null
br i1 %36, label %38, label %37
37: ; preds = %33
br label %64
38: ; preds = %33
%39 = load i32*, i32** %6
%40 = call i32* @PEM_read_bio_CMS(i32* %39, i32* null, i32 0, i32* null)
store i32* %40, i32** %12
%41 = load i32*, i32** %12
%42 = icmp ne i32* %41, null
br i1 %42, label %44, label %43
43: ; preds = %38
br label %64
44: ; preds = %38
%45 = call i32* @BIO_new_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %45, i32** %9
%46 = load i32*, i32** %6
%47 = icmp ne i32* %46, null
br i1 %47, label %49, label %48
48: ; preds = %44
br label %64
49: ; preds = %44
%50 = call i32* @BIO_new_file(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32* %50, i32** %7
%51 = load i32*, i32** %7
%52 = icmp ne i32* %51, null
br i1 %52, label %54, label %53
53: ; preds = %49
br label %64
54: ; preds = %49
%55 = load i32*, i32** %12
%56 = load i32*, i32** %11
%57 = load i32*, i32** %10
%58 = load i32*, i32** %9
%59 = load i32*, i32** %7
%60 = call i32 @CMS_decrypt(i32* %55, i32* %56, i32* %57, i32* %58, i32* %59, i32 0)
%61 = icmp ne i32 %60, 0
br i1 %61, label %63, label %62
62: ; preds = %54
br label %64
63: ; preds = %54
store i32 0, i32* %13
br label %64
64: ; preds = %63, %62, %53, %48, %43, %37, %32, %19
%65 = load i32, i32* %13
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %72
67: ; preds = %64
%68 = load i32, i32* @stderr
%69 = call i32 @fprintf(i32 %68, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%70 = load i32, i32* @stderr
%71 = call i32 @ERR_print_errors_fp(i32 %70)
br label %72
72: ; preds = %67, %64
%73 = load i32*, i32** %12
%74 = icmp ne i32* %73, null
br i1 %74, label %75, label %78
75: ; preds = %72
%76 = load i32*, i32** %12
%77 = call i32 @CMS_ContentInfo_free(i32* %76)
br label %78
78: ; preds = %75, %72
%79 = load i32*, i32** %10
%80 = icmp ne i32* %79, null
br i1 %80, label %81, label %84
81: ; preds = %78
%82 = load i32*, i32** %10
%83 = call i32 @X509_free(i32* %82)
br label %84
84: ; preds = %81, %78
%85 = load i32*, i32** %11
%86 = icmp ne i32* %85, null
br i1 %86, label %87, label %90
87: ; preds = %84
%88 = load i32*, i32** %11
%89 = call i32 @EVP_PKEY_free(i32* %88)
br label %90
90: ; preds = %87, %84
%91 = load i32*, i32** %6
%92 = icmp ne i32* %91, null
br i1 %92, label %93, label %96
93: ; preds = %90
%94 = load i32*, i32** %6
%95 = call i32 @BIO_free(i32* %94)
br label %96
96: ; preds = %93, %90
%97 = load i32*, i32** %7
%98 = icmp ne i32* %97, null
br i1 %98, label %99, label %102
99: ; preds = %96
%100 = load i32*, i32** %7
%101 = call i32 @BIO_free(i32* %100)
br label %102
102: ; preds = %99, %96
%103 = load i32*, i32** %8
%104 = icmp ne i32* %103, null
br i1 %104, label %105, label %108
105: ; preds = %102
%106 = load i32*, i32** %8
%107 = call i32 @BIO_free(i32* %106)
br label %108
108: ; preds = %105, %102
%109 = load i32*, i32** %9
%110 = icmp ne i32* %109, null
br i1 %110, label %111, label %114
111: ; preds = %108
%112 = load i32*, i32** %9
%113 = call i32 @BIO_free(i32* %112)
br label %114
114: ; preds = %111, %108
%115 = load i32, i32* %13
ret i32 %115
}

LLVM IR (-O2):
@.str = [11 x i8] c"signer.pem\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"smencr.pem\00"
@.str.3 = [11 x i8] c"smencr.out\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [12 x i8] c"encrout.txt\00"
@.str.6 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.7 = [23 x i8] c"Error Decrypting Data\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%4 = tail call i32 (...) @ERR_load_crypto_strings()
%5 = tail call i32* @BIO_new_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %27, label %7
7: ; preds = %2
%8 = tail call i32* @PEM_read_bio_X509(i32* %5, i32* null, i32 0, i32* null)
%9 = tail call i32 @BIO_reset(i32* %5)
%10 = tail call i32* @PEM_read_bio_PrivateKey(i32* %5, i32* null, i32 0, i32* null)
%11 = icmp ne i32* %8, null
%12 = icmp ne i32* %10, null
%13 = select i1 %11, i1 %12, i1 false
br i1 %13, label %14, label %27
14: ; preds = %7
%15 = tail call i32* @BIO_new_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %27, label %17
17: ; preds = %14
%18 = tail call i32* @PEM_read_bio_CMS(i32* %15, i32* null, i32 0, i32* null)
%19 = icmp eq i32* %18, null
br i1 %19, label %27, label %20
20: ; preds = %17
%21 = tail call i32* @BIO_new_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%22 = tail call i32* @BIO_new_file(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%23 = icmp eq i32* %22, null
br i1 %23, label %27, label %24
24: ; preds = %20
%25 = tail call i32 @CMS_decrypt(i32* %18, i32* %10, i32* %8, i32* %21, i32* %22, i32 0)
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %39
27: ; preds = %2, %7, %14, %17, %20, %24
%28 = phi i32* [ %18, %24 ], [ %18, %20 ], [ null, %17 ], [ null, %14 ], [ null, %7 ], [ null, %2 ]
%29 = phi i32* [ %10, %24 ], [ %10, %20 ], [ %10, %17 ], [ %10, %14 ], [ %10, %7 ], [ null, %2 ]
%30 = phi i32* [ %8, %24 ], [ %8, %20 ], [ %8, %17 ], [ %8, %14 ], [ %8, %7 ], [ null, %2 ]
%31 = phi i32* [ %21, %24 ], [ %21, %20 ], [ null, %17 ], [ null, %14 ], [ null, %7 ], [ null, %2 ]
%32 = phi i32* [ %22, %24 ], [ null, %20 ], [ null, %17 ], [ null, %14 ], [ null, %7 ], [ null, %2 ]
%33 = phi i32* [ %15, %24 ], [ %15, %20 ], [ %15, %17 ], [ null, %14 ], [ null, %7 ], [ null, %2 ]
%34 = load i32, i32* @stderr
%35 = tail call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%36 = load i32, i32* @stderr
%37 = tail call i32 @ERR_print_errors_fp(i32 %36)
%38 = icmp eq i32* %28, null
br i1 %38, label %48, label %39
39: ; preds = %24, %27
%40 = phi i32* [ %33, %27 ], [ %15, %24 ]
%41 = phi i32* [ %32, %27 ], [ %22, %24 ]
%42 = phi i32* [ %31, %27 ], [ %21, %24 ]
%43 = phi i32* [ %30, %27 ], [ %8, %24 ]
%44 = phi i32* [ %29, %27 ], [ %10, %24 ]
%45 = phi i32* [ %28, %27 ], [ %18, %24 ]
%46 = phi i32 [ 1, %27 ], [ 0, %24 ]
%47 = tail call i32 @CMS_ContentInfo_free(i32* %45)
br label %48
48: ; preds = %39, %27
%49 = phi i32* [ %40, %39 ], [ %33, %27 ]
%50 = phi i32* [ %41, %39 ], [ %32, %27 ]
%51 = phi i32* [ %42, %39 ], [ %31, %27 ]
%52 = phi i32* [ %43, %39 ], [ %30, %27 ]
%53 = phi i32* [ %44, %39 ], [ %29, %27 ]
%54 = phi i32 [ %46, %39 ], [ 1, %27 ]
%55 = icmp eq i32* %52, null
br i1 %55, label %58, label %56
56: ; preds = %48
%57 = tail call i32 @X509_free(i32* %52)
br label %58
58: ; preds = %56, %48
%59 = icmp eq i32* %53, null
br i1 %59, label %62, label %60
60: ; preds = %58
%61 = tail call i32 @EVP_PKEY_free(i32* %53)
br label %62
62: ; preds = %60, %58
%63 = icmp eq i32* %49, null
br i1 %63, label %66, label %64
64: ; preds = %62
%65 = tail call i32 @BIO_free(i32* %49)
br label %66
66: ; preds = %64, %62
%67 = icmp eq i32* %50, null
br i1 %67, label %70, label %68
68: ; preds = %66
%69 = tail call i32 @BIO_free(i32* %50)
br label %70
70: ; preds = %68, %66
br i1 %6, label %73, label %71
71: ; preds = %70
%72 = tail call i32 @BIO_free(i32* %5)
br label %73
73: ; preds = %71, %70
%74 = icmp eq i32* %51, null
br i1 %74, label %77, label %75
75: ; preds = %73
%76 = tail call i32 @BIO_free(i32* %51)
br label %77
77: ; preds = %75, %73
ret i32 %54
}