#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 */
typedef struct TYPE_6__ TYPE_2__;
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
struct TYPE_6__ {
  TYPE_1__ *enc_key;
};
struct TYPE_5__ {
  int /*<<< orphan*/ length;
  int /*<<< orphan*/ data;
};
typedef TYPE_2__ PKCS7_RECIP_INFO;
typedef int /*<<< orphan*/ EVP_PKEY_CTX;
typedef int /*<<< orphan*/ EVP_PKEY;

/* Variables and functions */
int /*<<< orphan*/ ERR_R_EVP_LIB;
int /*<<< orphan*/ ERR_R_MALLOC_FAILURE;
int /*<<< orphan*/ EVP_PKEY_CTRL_PKCS7_DECRYPT;
scalar_t__ EVP_PKEY_CTX_ctrl(int /*<<< orphan*/ *, int, int /*<<< orphan*/,
                             int /*<<< orphan*/, int /*<<< orphan*/,
                             TYPE_2__ *);
int /*<<< orphan*/ EVP_PKEY_CTX_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *EVP_PKEY_CTX_new(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *);
int /*<<< orphan*/ EVP_PKEY_OP_DECRYPT;
scalar_t__ EVP_PKEY_decrypt(int /*<<< orphan*/ *, unsigned char *, size_t *,
                            int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ EVP_PKEY_decrypt_init(int /*<<< orphan*/ *);
int /*<<< orphan*/ OPENSSL_cleanse(unsigned char *, int);
int /*<<< orphan*/ PKCS7_F_PKCS7_DECRYPT_RINFO;
int /*<<< orphan*/ PKCS7_R_CTRL_ERROR;
int /*<<< orphan*/ PKCS7err(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ free(unsigned char *);
unsigned char *malloc(size_t);
int pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen, PKCS7_RECIP_INFO *ri,
                        EVP_PKEY *pkey) {
  EVP_PKEY_CTX *pctx = NULL;
  unsigned char *ek = NULL;
  size_t eklen;
  int ret = -1;
  pctx = EVP_PKEY_CTX_new(pkey, NULL);
  if (!pctx)
    return -1;
  if (EVP_PKEY_decrypt_init(pctx) <= 0)
    goto err;
  if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DECRYPT,
                        EVP_PKEY_CTRL_PKCS7_DECRYPT, 0, ri) <= 0) {
    PKCS7err(PKCS7_F_PKCS7_DECRYPT_RINFO, PKCS7_R_CTRL_ERROR);
    goto err;
  }
  if (EVP_PKEY_decrypt(pctx, NULL, &eklen, ri->enc_key->data,
                       ri->enc_key->length) <= 0)
    goto err;
  ek = malloc(eklen);
  if (ek == NULL) {
    PKCS7err(PKCS7_F_PKCS7_DECRYPT_RINFO, ERR_R_MALLOC_FAILURE);
    goto err;
  }
  if (EVP_PKEY_decrypt(pctx, ek, &eklen, ri->enc_key->data,
                       ri->enc_key->length) <= 0) {
    ret = 0;
    PKCS7err(PKCS7_F_PKCS7_DECRYPT_RINFO, ERR_R_EVP_LIB);
    goto err;
  }
  ret = 1;
  if (*pek) {
    OPENSSL_cleanse(*pek, *peklen);
    free(*pek);
  }
  *pek = ek;
  *peklen = eklen;
err:
  if (pctx)
    EVP_PKEY_CTX_free(pctx);
  if (!ret && ek)
    free(ek);
  return ret;
}


x86 assembly (clang, -O0):
<pkcs7_decrypt_rinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0xffffffff,-0x44(%rbp)
mov    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <EVP_PKEY_CTX_new@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    11e7 <pkcs7_decrypt_rinfo+0x57>
movl   $0xffffffff,-0x4(%rbp)
jmp    1388 <pkcs7_decrypt_rinfo+0x1f8>
mov    -0x30(%rbp),%rdi
call   10a0 <EVP_PKEY_decrypt_init@plt>
cmp    $0x0,%rax
jg     11ff <pkcs7_decrypt_rinfo+0x6f>
jmp    1350 <pkcs7_decrypt_rinfo+0x1c0>
mov    -0x30(%rbp),%rdi
mov    0x2db6(%rip),%rax
mov    (%rax),%edx
mov    0x2db5(%rip),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%r9
mov    $0xffffffff,%esi
xor    %r8d,%r8d
call   1070 <EVP_PKEY_CTX_ctrl@plt>
cmp    $0x0,%rax
jg     124c <pkcs7_decrypt_rinfo+0xbc>
mov    0x2d81(%rip),%rax
mov    (%rax),%edi
mov    0x2da8(%rip),%rax
mov    (%rax),%esi
call   1080 <PKCS7err@plt>
jmp    1350 <pkcs7_decrypt_rinfo+0x1c0>
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    0x4(%rax),%ecx
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%r8d
xor    %eax,%eax
mov    %eax,%esi
lea    -0x40(%rbp),%rdx
call   1050 <EVP_PKEY_decrypt@plt>
cmp    $0x0,%rax
jg     1280 <pkcs7_decrypt_rinfo+0xf0>
jmp    1350 <pkcs7_decrypt_rinfo+0x1c0>
mov    -0x40(%rbp),%rdi
call   1090 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    12b4 <pkcs7_decrypt_rinfo+0x124>
mov    0x2d19(%rip),%rax
mov    (%rax),%edi
mov    0x2d30(%rip),%rax
mov    (%rax),%esi
call   1080 <PKCS7err@plt>
jmp    1350 <pkcs7_decrypt_rinfo+0x1c0>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    0x4(%rax),%ecx
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%r8d
lea    -0x40(%rbp),%rdx
call   1050 <EVP_PKEY_decrypt@plt>
cmp    $0x0,%rax
jg     1306 <pkcs7_decrypt_rinfo+0x176>
movl   $0x0,-0x44(%rbp)
mov    0x2cc7(%rip),%rax
mov    (%rax),%edi
mov    0x2ce6(%rip),%rax
mov    (%rax),%esi
call   1080 <PKCS7err@plt>
jmp    1350 <pkcs7_decrypt_rinfo+0x1c0>
movl   $0x1,-0x44(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1339 <pkcs7_decrypt_rinfo+0x1a9>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1060 <OPENSSL_cleanse@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <free@plt>
mov    -0x38(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x40(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x30(%rbp)
je     1364 <pkcs7_decrypt_rinfo+0x1d4>
mov    -0x30(%rbp),%rdi
call   10b0 <EVP_PKEY_CTX_free@plt>
cmpl   $0x0,-0x44(%rbp)
jne    1382 <pkcs7_decrypt_rinfo+0x1f2>
cmpq   $0x0,-0x38(%rbp)
je     1382 <pkcs7_decrypt_rinfo+0x1f2>
mov    -0x38(%rbp),%rdi
call   1040 <free@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pkcs7_decrypt_rinfo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rcx,%rdi
xor    %esi,%esi
call   1030 <EVP_PKEY_CTX_new@plt>
test   %rax,%rax
je     1274 <pkcs7_decrypt_rinfo+0xe4>
mov    %rax,%rbx
mov    %rax,%rdi
call   10a0 <EVP_PKEY_decrypt_init@plt>
test   %rax,%rax
jle    127b <pkcs7_decrypt_rinfo+0xeb>
mov    0x2dee(%rip),%rax
mov    (%rax),%edx
mov    0x2ded(%rip),%rax
mov    (%rax),%ecx
mov    $0xffffffff,%ebp
mov    %rbx,%rdi
mov    $0xffffffff,%esi
xor    %r8d,%r8d
mov    %r12,%r9
call   1070 <EVP_PKEY_CTX_ctrl@plt>
test   %rax,%rax
jle    1282 <pkcs7_decrypt_rinfo+0xf2>
mov    (%r12),%rax
mov    (%rax),%r8d
mov    0x4(%rax),%ecx
mov    %rsp,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <EVP_PKEY_decrypt@plt>
test   %rax,%rax
jle    12ab <pkcs7_decrypt_rinfo+0x11b>
mov    (%rsp),%rdi
call   1090 <malloc@plt>
test   %rax,%rax
je     1294 <pkcs7_decrypt_rinfo+0x104>
mov    %rax,%r13
mov    (%r12),%rax
mov    (%rax),%r8d
mov    0x4(%rax),%ecx
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <EVP_PKEY_decrypt@plt>
test   %rax,%rax
jle    12c4 <pkcs7_decrypt_rinfo+0x134>
mov    (%r15),%rdi
test   %rdi,%rdi
je     1264 <pkcs7_decrypt_rinfo+0xd4>
mov    (%r14),%esi
call   1060 <OPENSSL_cleanse@plt>
mov    (%r15),%rdi
call   1040 <free@plt>
mov    %r13,(%r15)
mov    (%rsp),%eax
mov    %eax,(%r14)
mov    $0x1,%ebp
jmp    12ab <pkcs7_decrypt_rinfo+0x11b>
mov    $0xffffffff,%ebp
jmp    12b3 <pkcs7_decrypt_rinfo+0x123>
mov    $0xffffffff,%ebp
jmp    12ab <pkcs7_decrypt_rinfo+0x11b>
mov    0x2d2f(%rip),%rax
mov    (%rax),%edi
mov    0x2d56(%rip),%rax
jmp    12a4 <pkcs7_decrypt_rinfo+0x114>
mov    0x2d1d(%rip),%rax
mov    (%rax),%edi
mov    0x2d34(%rip),%rax
mov    (%rax),%esi
call   1080 <PKCS7err@plt>
mov    %rbx,%rdi
call   10b0 <EVP_PKEY_CTX_free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2ced(%rip),%rax
mov    (%rax),%edi
mov    0x2d0c(%rip),%rax
mov    (%rax),%esi
call   1080 <PKCS7err@plt>
mov    %rbx,%rdi
call   10b0 <EVP_PKEY_CTX_free@plt>
mov    %r13,%rdi
call   1040 <free@plt>
xor    %ebp,%ebp
jmp    12b3 <pkcs7_decrypt_rinfo+0x123>

LLVM IR (-O0):
%struct.TYPE_6__ = type { %struct.TYPE_5__* }
%struct.TYPE_5__ = type { i32, i32 }
@EVP_PKEY_OP_DECRYPT = global i32 0
@EVP_PKEY_CTRL_PKCS7_DECRYPT = global i32 0
@PKCS7_F_PKCS7_DECRYPT_RINFO = global i32 0
@PKCS7_R_CTRL_ERROR = global i32 0
@ERR_R_MALLOC_FAILURE = global i32 0
@ERR_R_EVP_LIB = global i32 0
define i32 @pkcs7_decrypt_rinfo(i8** %0, i32* %1, %struct.TYPE_6__* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32*
%8 = alloca %struct.TYPE_6__*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i32
store i8** %0, i8*** %6
store i32* %1, i32** %7
store %struct.TYPE_6__* %2, %struct.TYPE_6__** %8
store i32* %3, i32** %9
store i32* null, i32** %10
store i8* null, i8** %11
store i32 -1, i32* %13
%14 = load i32*, i32** %9
%15 = call i32* @EVP_PKEY_CTX_new(i32* %14, i32* null)
store i32* %15, i32** %10
%16 = load i32*, i32** %10
%17 = icmp ne i32* %16, null
br i1 %17, label %19, label %18
18: ; preds = %4
store i32 -1, i32* %5
br label %114
19: ; preds = %4
%20 = load i32*, i32** %10
%21 = call i64 @EVP_PKEY_decrypt_init(i32* %20)
%22 = icmp sle i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %19
br label %97
24: ; preds = %19
%25 = load i32*, i32** %10
%26 = load i32, i32* @EVP_PKEY_OP_DECRYPT
%27 = load i32, i32* @EVP_PKEY_CTRL_PKCS7_DECRYPT
%28 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%29 = call i64 @EVP_PKEY_CTX_ctrl(i32* %25, i32 -1, i32 %26, i32 %27, i32 0, %struct.TYPE_6__* %28)
%30 = icmp sle i64 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %24
%32 = load i32, i32* @PKCS7_F_PKCS7_DECRYPT_RINFO
%33 = load i32, i32* @PKCS7_R_CTRL_ERROR
%34 = call i32 @PKCS7err(i32 %32, i32 %33)
br label %97
35: ; preds = %24
%36 = load i32*, i32** %10
%37 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%38 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %37, i32 0, i32 0
%39 = load %struct.TYPE_5__*, %struct.TYPE_5__** %38
%40 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %39, i32 0, i32 1
%41 = load i32, i32* %40
%42 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%43 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %42, i32 0, i32 0
%44 = load %struct.TYPE_5__*, %struct.TYPE_5__** %43
%45 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %44, i32 0, i32 0
%46 = load i32, i32* %45
%47 = call i64 @EVP_PKEY_decrypt(i32* %36, i8* null, i64* %12, i32 %41, i32 %46)
%48 = icmp sle i64 %47, 0
br i1 %48, label %49, label %50
49: ; preds = %35
br label %97
50: ; preds = %35
%51 = load i64, i64* %12
%52 = call i8* @malloc(i64 %51)
store i8* %52, i8** %11
%53 = load i8*, i8** %11
%54 = icmp eq i8* %53, null
br i1 %54, label %55, label %59
55: ; preds = %50
%56 = load i32, i32* @PKCS7_F_PKCS7_DECRYPT_RINFO
%57 = load i32, i32* @ERR_R_MALLOC_FAILURE
%58 = call i32 @PKCS7err(i32 %56, i32 %57)
br label %97
59: ; preds = %50
%60 = load i32*, i32** %10
%61 = load i8*, i8** %11
%62 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%63 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %62, i32 0, i32 0
%64 = load %struct.TYPE_5__*, %struct.TYPE_5__** %63
%65 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %64, i32 0, i32 1
%66 = load i32, i32* %65
%67 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%68 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %67, i32 0, i32 0
%69 = load %struct.TYPE_5__*, %struct.TYPE_5__** %68
%70 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %69, i32 0, i32 0
%71 = load i32, i32* %70
%72 = call i64 @EVP_PKEY_decrypt(i32* %60, i8* %61, i64* %12, i32 %66, i32 %71)
%73 = icmp sle i64 %72, 0
br i1 %73, label %74, label %78
74: ; preds = %59
store i32 0, i32* %13
%75 = load i32, i32* @PKCS7_F_PKCS7_DECRYPT_RINFO
%76 = load i32, i32* @ERR_R_EVP_LIB
%77 = call i32 @PKCS7err(i32 %75, i32 %76)
br label %97
78: ; preds = %59
store i32 1, i32* %13
%79 = load i8**, i8*** %6
%80 = load i8*, i8** %79
%81 = icmp ne i8* %80, null
br i1 %81, label %82, label %91
82: ; preds = %78
%83 = load i8**, i8*** %6
%84 = load i8*, i8** %83
%85 = load i32*, i32** %7
%86 = load i32, i32* %85
%87 = call i32 @OPENSSL_cleanse(i8* %84, i32 %86)
%88 = load i8**, i8*** %6
%89 = load i8*, i8** %88
%90 = call i32 @free(i8* %89)
br label %91
91: ; preds = %82, %78
%92 = load i8*, i8** %11
%93 = load i8**, i8*** %6
store i8* %92, i8** %93
%94 = load i64, i64* %12
%95 = trunc i64 %94 to i32
%96 = load i32*, i32** %7
store i32 %95, i32* %96
br label %97
97: ; preds = %91, %74, %55, %49, %31, %23
%98 = load i32*, i32** %10
%99 = icmp ne i32* %98, null
br i1 %99, label %100, label %103
100: ; preds = %97
%101 = load i32*, i32** %10
%102 = call i32 @EVP_PKEY_CTX_free(i32* %101)
br label %103
103: ; preds = %100, %97
%104 = load i32, i32* %13
%105 = icmp ne i32 %104, 0
br i1 %105, label %112, label %106
106: ; preds = %103
%107 = load i8*, i8** %11
%108 = icmp ne i8* %107, null
br i1 %108, label %109, label %112
109: ; preds = %106
%110 = load i8*, i8** %11
%111 = call i32 @free(i8* %110)
br label %112
112: ; preds = %109, %106, %103
%113 = load i32, i32* %13
store i32 %113, i32* %5
br label %114
114: ; preds = %112, %18
%115 = load i32, i32* %5
ret i32 %115
}

LLVM IR (-O2):
%struct.TYPE_6__ = type { %struct.TYPE_5__* }
%struct.TYPE_5__ = type { i32, i32 }
@EVP_PKEY_OP_DECRYPT = global i32 0
@EVP_PKEY_CTRL_PKCS7_DECRYPT = global i32 0
@PKCS7_F_PKCS7_DECRYPT_RINFO = global i32 0
@PKCS7_R_CTRL_ERROR = global i32 0
@ERR_R_MALLOC_FAILURE = global i32 0
@ERR_R_EVP_LIB = global i32 0
define i32 @pkcs7_decrypt_rinfo(i8** nocapture %0, i32* nocapture %1, %struct.TYPE_6__* %2, i32* %3) {
%5 = alloca i64
%6 = bitcast i64* %5 to i8*
%7 = tail call i32* @EVP_PKEY_CTX_new(i32* %3, i32* null)
%8 = icmp eq i32* %7, null
br i1 %8, label %66, label %9
9: ; preds = %4
%10 = tail call i64 @EVP_PKEY_decrypt_init(i32* %7)
%11 = icmp slt i64 %10, 1
br i1 %11, label %57, label %12
12: ; preds = %9
%13 = load i32, i32* @EVP_PKEY_OP_DECRYPT
%14 = load i32, i32* @EVP_PKEY_CTRL_PKCS7_DECRYPT
%15 = tail call i64 @EVP_PKEY_CTX_ctrl(i32* %7, i32 -1, i32 %13, i32 %14, i32 0, %struct.TYPE_6__* %2)
%16 = icmp slt i64 %15, 1
br i1 %16, label %17, label %21
17: ; preds = %12
%18 = load i32, i32* @PKCS7_F_PKCS7_DECRYPT_RINFO
%19 = load i32, i32* @PKCS7_R_CTRL_ERROR
%20 = tail call i32 @PKCS7err(i32 %18, i32 %19)
br label %57
21: ; preds = %12
%22 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %2, i64 0, i32 0
%23 = load %struct.TYPE_5__*, %struct.TYPE_5__** %22
%24 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %23, i64 0, i32 1
%25 = load i32, i32* %24
%26 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %23, i64 0, i32 0
%27 = load i32, i32* %26
%28 = call i64 @EVP_PKEY_decrypt(i32* %7, i8* null, i64* %5, i32 %25, i32 %27)
%29 = icmp slt i64 %28, 1
br i1 %29, label %57, label %30
30: ; preds = %21
%31 = load i64, i64* %5
%32 = call i8* @malloc(i64 %31)
%33 = icmp eq i8* %32, null
br i1 %33, label %34, label %38
34: ; preds = %30
%35 = load i32, i32* @PKCS7_F_PKCS7_DECRYPT_RINFO
%36 = load i32, i32* @ERR_R_MALLOC_FAILURE
%37 = call i32 @PKCS7err(i32 %35, i32 %36)
br label %57
38: ; preds = %30
%39 = load %struct.TYPE_5__*, %struct.TYPE_5__** %22
%40 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %39, i64 0, i32 1
%41 = load i32, i32* %40
%42 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %39, i64 0, i32 0
%43 = load i32, i32* %42
%44 = call i64 @EVP_PKEY_decrypt(i32* %7, i8* %32, i64* %5, i32 %41, i32 %43)
%45 = icmp slt i64 %44, 1
br i1 %45, label %60, label %46
46: ; preds = %38
%47 = load i8*, i8** %0
%48 = icmp eq i8* %47, null
br i1 %48, label %54, label %49
49: ; preds = %46
%50 = load i32, i32* %1
%51 = call i32 @OPENSSL_cleanse(i8* %47, i32 %50)
%52 = load i8*, i8** %0
%53 = call i32 @free(i8* %52)
br label %54
54: ; preds = %49, %46
store i8* %32, i8** %0
%55 = load i64, i64* %5
%56 = trunc i64 %55 to i32
store i32 %56, i32* %1
br label %57
57: ; preds = %9, %17, %21, %34, %54
%58 = phi i32 [ 1, %54 ], [ -1, %34 ], [ -1, %21 ], [ -1, %17 ], [ -1, %9 ]
%59 = call i32 @EVP_PKEY_CTX_free(i32* %7)
br label %66
60: ; preds = %38
%61 = load i32, i32* @PKCS7_F_PKCS7_DECRYPT_RINFO
%62 = load i32, i32* @ERR_R_EVP_LIB
%63 = call i32 @PKCS7err(i32 %61, i32 %62)
%64 = call i32 @EVP_PKEY_CTX_free(i32* %7)
%65 = call i32 @free(i8* %32)
br label %66
66: ; preds = %57, %60, %4
%67 = phi i32 [ -1, %4 ], [ 0, %60 ], [ %58, %57 ]
ret i32 %67
}