#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 CMS_DETACHED;
int CMS_STREAM;
int /*<<< orphan*/ *CMS_sign(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
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_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*/ SMIME_write_CMS(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                   int /*<<< orphan*/ *, int);
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;
  X509 *scert = NULL;
  EVP_PKEY *skey = NULL;
  CMS_ContentInfo *cms = NULL;
  int ret = 1;
  int flags = CMS_DETACHED | CMS_STREAM;
  OpenSSL_add_all_algorithms();
  ERR_load_crypto_strings();
  tbio = BIO_new_file("signer.pem", "r");
  if (!tbio)
    goto err;
  scert = PEM_read_bio_X509(tbio, NULL, 0, NULL);
  BIO_reset(tbio);
  skey = PEM_read_bio_PrivateKey(tbio, NULL, 0, NULL);
  if (!scert || !skey)
    goto err;
  in = BIO_new_file("sign.txt", "r");
  if (!in)
    goto err;
  cms = CMS_sign(scert, skey, NULL, in, flags);
  if (!cms)
    goto err;
  out = BIO_new_file("smout.txt", "w");
  if (!out)
    goto err;
  if (!(flags & CMS_STREAM))
    BIO_reset(in);
  if (!SMIME_write_CMS(out, cms, in, flags))
    goto err;
  ret = 0;
err:
  if (ret) {
    fprintf(stderr, "Error Signing Data\n");
    ERR_print_errors_fp(stderr);
  }
  if (cms)
    CMS_ContentInfo_free(cms);
  if (scert)
    X509_free(scert);
  if (skey)
    EVP_PKEY_free(skey);
  if (in)
    BIO_free(in);
  if (out)
    BIO_free(out);
  if (tbio)
    BIO_free(tbio);
  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)
movl   $0x1,-0x44(%rbp)
mov    0x2dc4(%rip),%rax
mov    (%rax),%eax
mov    0x2da3(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x48(%rbp)
mov    $0x0,%al
call   1050 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   10a0 <ERR_load_crypto_strings@plt>
lea    0xda9(%rip),%rdi
lea    0xdad(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1277 <main+0x97>
jmp    1389 <main+0x1a9>
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,-0x30(%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,-0x38(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     12c2 <main+0xe2>
cmpq   $0x0,-0x38(%rbp)
jne    12c7 <main+0xe7>
jmp    1389 <main+0x1a9>
lea    0xd3f(%rip),%rdi
lea    0xd36(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    12ee <main+0x10e>
jmp    1389 <main+0x1a9>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x48(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edx
call   1070 <CMS_sign@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    131b <main+0x13b>
jmp    1389 <main+0x1a9>
lea    0xcf4(%rip),%rdi
lea    0xcf7(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1342 <main+0x162>
jmp    1389 <main+0x1a9>
mov    -0x48(%rbp),%eax
mov    0x2c94(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
jne    1360 <main+0x180>
mov    -0x18(%rbp),%rdi
call   10b0 <BIO_reset@plt>
mov    -0x20(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x48(%rbp),%ecx
call   1060 <SMIME_write_CMS@plt>
cmp    $0x0,%eax
jne    1382 <main+0x1a2>
jmp    1389 <main+0x1a9>
movl   $0x0,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     13b6 <main+0x1d6>
mov    0x2c36(%rip),%rax
mov    (%rax),%edi
lea    0xc7f(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2c21(%rip),%rax
mov    (%rax),%edi
call   10e0 <ERR_print_errors_fp@plt>
cmpq   $0x0,-0x40(%rbp)
je     13ca <main+0x1ea>
mov    -0x40(%rbp),%rdi
call   1100 <CMS_ContentInfo_free@plt>
cmpq   $0x0,-0x30(%rbp)
je     13de <main+0x1fe>
mov    -0x30(%rbp),%rdi
call   1090 <X509_free@plt>
cmpq   $0x0,-0x38(%rbp)
je     13f2 <main+0x212>
mov    -0x38(%rbp),%rdi
call   1030 <EVP_PKEY_free@plt>
cmpq   $0x0,-0x18(%rbp)
je     1406 <main+0x226>
mov    -0x18(%rbp),%rdi
call   1080 <BIO_free@plt>
cmpq   $0x0,-0x20(%rbp)
je     141a <main+0x23a>
mov    -0x20(%rbp),%rdi
call   1080 <BIO_free@plt>
cmpq   $0x0,-0x28(%rbp)
je     142e <main+0x24e>
mov    -0x28(%rbp),%rdi
call   1080 <BIO_free@plt>
mov    -0x44(%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
push   %rax
mov    0x2e06(%rip),%rax
mov    0x2de7(%rip),%rcx
mov    (%rcx),%r12d
or     (%rax),%r12d
xor    %r14d,%r14d
xor    %eax,%eax
call   1050 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
call   10a0 <ERR_load_crypto_strings@plt>
lea    0xde9(%rip),%rdi
lea    0xded(%rip),%rsi
call   10f0 <BIO_new_file@plt>
mov    %rax,%r13
test   %rax,%rax
je     12f6 <main+0x116>
xor    %r14d,%r14d
mov    %r13,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   10d0 <PEM_read_bio_X509@plt>
mov    %rax,%rbp
mov    %r13,%rdi
call   10b0 <BIO_reset@plt>
mov    %r13,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   10c0 <PEM_read_bio_PrivateKey@plt>
mov    %rax,%rbx
test   %rbp,%rbp
je     1302 <main+0x122>
test   %rbx,%rbx
je     1302 <main+0x122>
lea    0xd98(%rip),%rdi
lea    0xd8f(%rip),%rsi
call   10f0 <BIO_new_file@plt>
test   %rax,%rax
je     12ff <main+0x11f>
mov    %rax,%r14
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
mov    %rax,%rcx
mov    %r12d,%r8d
call   1070 <CMS_sign@plt>
test   %rax,%rax
je     1392 <main+0x1b2>
mov    %rax,%r15
lea    0xd67(%rip),%rdi
lea    0xd6a(%rip),%rsi
call   10f0 <BIO_new_file@plt>
test   %rax,%rax
je     1305 <main+0x125>
mov    0x2d19(%rip),%rcx
test   %r12d,(%rcx)
mov    %rax,(%rsp)
jne    12dc <main+0xfc>
mov    %r14,%rdi
call   10b0 <BIO_reset@plt>
mov    (%rsp),%rax
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %r12d,%ecx
call   1060 <SMIME_write_CMS@plt>
xor    %r12d,%r12d
test   %eax,%eax
jne    1336 <main+0x156>
jmp    130b <main+0x12b>
xor    %r15d,%r15d
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    1305 <main+0x125>
xor    %r14d,%r14d
xor    %r15d,%r15d
xor    %eax,%eax
mov    %rax,(%rsp)
mov    0x2cbe(%rip),%r12
mov    (%r12),%edi
lea    0xd05(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%r12),%edi
call   10e0 <ERR_print_errors_fp@plt>
mov    $0x1,%r12d
test   %r15,%r15
je     133e <main+0x15e>
mov    %r15,%rdi
call   1100 <CMS_ContentInfo_free@plt>
test   %rbp,%rbp
je     134b <main+0x16b>
mov    %rbp,%rdi
call   1090 <X509_free@plt>
test   %rbx,%rbx
je     1358 <main+0x178>
mov    %rbx,%rdi
call   1030 <EVP_PKEY_free@plt>
test   %r14,%r14
je     1365 <main+0x185>
mov    %r14,%rdi
call   1080 <BIO_free@plt>
mov    (%rsp),%rdi
test   %rdi,%rdi
je     1373 <main+0x193>
call   1080 <BIO_free@plt>
test   %r13,%r13
je     1380 <main+0x1a0>
mov    %r13,%rdi
call   1080 <BIO_free@plt>
mov    %r12d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
mov    %rax,(%rsp)
xor    %r15d,%r15d
jmp    130b <main+0x12b>

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

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