#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_21__ TYPE_6__;
typedef struct TYPE_20__ TYPE_5__;
typedef struct TYPE_19__ TYPE_4__;
typedef struct TYPE_18__ TYPE_3__;
typedef struct TYPE_17__ TYPE_2__;
typedef struct TYPE_16__ TYPE_1__;

/* Type definitions */
struct TYPE_21__ {
  int type;
};
struct TYPE_20__ {
  scalar_t__ utype;
  TYPE_4__ *funcs;
};
struct TYPE_19__ {
  int (*prim_c2i)(int /*<<< orphan*/ **, unsigned char const *, int, int,
                  char *, TYPE_5__ const *);
};
struct TYPE_18__ {
  int type;
  unsigned char *data;
  int length;
};
struct TYPE_16__ {
  int /*<<< orphan*/ *ptr;
};
struct TYPE_17__ {
  int type;
  TYPE_1__ value;
};
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef TYPE_2__ ASN1_TYPE;
typedef TYPE_3__ ASN1_STRING;
typedef TYPE_4__ ASN1_PRIMITIVE_FUNCS;
typedef int /*<<< orphan*/ ASN1_OBJECT;
typedef TYPE_5__ ASN1_ITEM;
typedef TYPE_6__ ASN1_INTEGER;
typedef unsigned char ASN1_BOOLEAN;
typedef int /*<<< orphan*/ ASN1_BIT_STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_F_ASN1_EX_C2I;
int /*<<< orphan*/ ASN1_R_BOOLEAN_IS_WRONG_LENGTH;
int /*<<< orphan*/ ASN1_R_NULL_IS_WRONG_LENGTH;
int /*<<< orphan*/ ASN1_STRING_free(TYPE_3__ *);
int /*<<< orphan*/ ASN1_STRING_set(TYPE_3__ *, unsigned char const *, int);
TYPE_3__ *ASN1_STRING_type_new(int);
int /*<<< orphan*/ ASN1_TYPE_free(TYPE_2__ *);
TYPE_2__ *ASN1_TYPE_new();
int /*<<< orphan*/ ASN1_TYPE_set(TYPE_2__ *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ ASN1err(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ ERR_R_MALLOC_FAILURE;
int /*<<< orphan*/ OPENSSL_free(unsigned char *);
scalar_t__ V_ASN1_ANY;
#define V_ASN1_BIT_STRING 152
#define V_ASN1_BMPSTRING 151
#define V_ASN1_BOOLEAN 150
#define V_ASN1_ENUMERATED 149
#define V_ASN1_GENERALIZEDTIME 148
#define V_ASN1_GENERALSTRING 147
#define V_ASN1_GRAPHICSTRING 146
#define V_ASN1_IA5STRING 145
#define V_ASN1_INTEGER 144
int V_ASN1_NEG;
#define V_ASN1_NEG_ENUMERATED 143
#define V_ASN1_NEG_INTEGER 142
#define V_ASN1_NULL 141
#define V_ASN1_NUMERICSTRING 140
#define V_ASN1_OBJECT 139
#define V_ASN1_OCTET_STRING 138
#define V_ASN1_OTHER 137
#define V_ASN1_PRINTABLESTRING 136
#define V_ASN1_SEQUENCE 135
#define V_ASN1_SET 134
#define V_ASN1_T61STRING 133
#define V_ASN1_UNIVERSALSTRING 132
#define V_ASN1_UTCTIME 131
#define V_ASN1_UTF8STRING 130
#define V_ASN1_VIDEOTEXSTRING 129
#define V_ASN1_VISIBLESTRING 128
int /*<<< orphan*/ c2i_ASN1_BIT_STRING(int /*<<< orphan*/ **,
                                       unsigned char const **, int);
int /*<<< orphan*/ c2i_ASN1_INTEGER(TYPE_6__ **, unsigned char const **, int);
int /*<<< orphan*/ c2i_ASN1_OBJECT(int /*<<< orphan*/ **,
                                   unsigned char const **, int);
int stub1(int /*<<< orphan*/ **, unsigned char const *, int, int, char *,
          TYPE_5__ const *);
int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
                int utype, char *free_cont, const ASN1_ITEM *it) {
  ASN1_VALUE **opval = NULL;
  ASN1_STRING *stmp;
  ASN1_TYPE *typ = NULL;
  int ret = 0;
  const ASN1_PRIMITIVE_FUNCS *pf;
  ASN1_INTEGER **tint;
  pf = it->funcs;
  if (pf && pf->prim_c2i)
    return pf->prim_c2i(pval, cont, len, utype, free_cont, it);
  if (it->utype == V_ASN1_ANY) {
    if (!*pval) {
      typ = ASN1_TYPE_new();
      if (typ == NULL)
        goto err;
      *pval = (ASN1_VALUE *)typ;
    } else
      typ = (ASN1_TYPE *)*pval;
    if (utype != typ->type)
      ASN1_TYPE_set(typ, utype, NULL);
    opval = pval;
    pval = (ASN1_VALUE **)&typ->value.ptr;
  }
  switch (utype) {
  case V_ASN1_OBJECT:
    if (!c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, len))
      goto err;
    break;
  case V_ASN1_NULL:
    if (len) {
      ASN1err(ASN1_F_ASN1_EX_C2I, ASN1_R_NULL_IS_WRONG_LENGTH);
      goto err;
    }
    *pval = (ASN1_VALUE *)1;
    break;
  case V_ASN1_BOOLEAN:
    if (len != 1) {
      ASN1err(ASN1_F_ASN1_EX_C2I, ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
      goto err;
    } else {
      ASN1_BOOLEAN *tbool;
      tbool = (ASN1_BOOLEAN *)pval;
      *tbool = *cont;
    }
    break;
  case V_ASN1_BIT_STRING:
    if (!c2i_ASN1_BIT_STRING((ASN1_BIT_STRING **)pval, &cont, len))
      goto err;
    break;
  case V_ASN1_INTEGER:
  case V_ASN1_NEG_INTEGER:
  case V_ASN1_ENUMERATED:
  case V_ASN1_NEG_ENUMERATED:
    tint = (ASN1_INTEGER **)pval;
    if (!c2i_ASN1_INTEGER(tint, &cont, len))
      goto err;
    (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG);
    break;
  case V_ASN1_OCTET_STRING:
  case V_ASN1_NUMERICSTRING:
  case V_ASN1_PRINTABLESTRING:
  case V_ASN1_T61STRING:
  case V_ASN1_VIDEOTEXSTRING:
  case V_ASN1_IA5STRING:
  case V_ASN1_UTCTIME:
  case V_ASN1_GENERALIZEDTIME:
  case V_ASN1_GRAPHICSTRING:
  case V_ASN1_VISIBLESTRING:
  case V_ASN1_GENERALSTRING:
  case V_ASN1_UNIVERSALSTRING:
  case V_ASN1_BMPSTRING:
  case V_ASN1_UTF8STRING:
  case V_ASN1_OTHER:
  case V_ASN1_SET:
  case V_ASN1_SEQUENCE:
  default:
    if (!*pval) {
      stmp = ASN1_STRING_type_new(utype);
      if (!stmp) {
        ASN1err(ASN1_F_ASN1_EX_C2I, ERR_R_MALLOC_FAILURE);
        goto err;
      }
      *pval = (ASN1_VALUE *)stmp;
    } else {
      stmp = (ASN1_STRING *)*pval;
      stmp->type = utype;
    }
    if (*free_cont) {
      if (stmp->data)
        OPENSSL_free(stmp->data);
      stmp->data = (unsigned char *)cont;
      stmp->length = len;
      *free_cont = 0;
    } else {
      if (!ASN1_STRING_set(stmp, cont, len)) {
        ASN1err(ASN1_F_ASN1_EX_C2I, ERR_R_MALLOC_FAILURE);
        ASN1_STRING_free(stmp);
        *pval = NULL;
        goto err;
      }
    }
    break;
  }
  if (typ && (utype == V_ASN1_NULL))
    typ->value.ptr = NULL;
  ret = 1;
err:
  if (!ret) {
    ASN1_TYPE_free(typ);
    if (opval)
      *opval = NULL;
  }
  return ret;
}


x86 assembly (clang, -O0):
<asn1_ex_c2i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
je     1231 <asn1_ex_c2i+0x81>
mov    -0x58(%rbp),%rax
cmpq   $0x0,(%rax)
je     1231 <asn1_ex_c2i+0x81>
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   *%rax
mov    %eax,-0x4(%rbp)
jmp    1556 <asn1_ex_c2i+0x3a6>
mov    -0x30(%rbp),%rax
mov    (%rax),%rax
mov    0x2d79(%rip),%rcx
cmp    (%rcx),%rax
jne    12bf <asn1_ex_c2i+0x10f>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1281 <asn1_ex_c2i+0xd1>
mov    $0x0,%al
call   1030 <ASN1_TYPE_new@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    1271 <asn1_ex_c2i+0xc1>
jmp    1522 <asn1_ex_c2i+0x372>
mov    -0x48(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    128c <asn1_ex_c2i+0xdc>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x48(%rbp),%rcx
cmp    (%rcx),%eax
je     12ab <asn1_ex_c2i+0xfb>
mov    -0x48(%rbp),%rdi
mov    -0x20(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
call   10d0 <ASN1_TYPE_set@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x48(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x70(%rbp)
sub    $0x18,%eax
ja     13f4 <asn1_ex_c2i+0x244>
mov    -0x70(%rbp),%rax
lea    0xd21(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    -0x18(%rbp),%rsi
call   1090 <c2i_ASN1_OBJECT@plt>
cmp    $0x0,%eax
jne    1306 <asn1_ex_c2i+0x156>
jmp    1522 <asn1_ex_c2i+0x372>
jmp    14f7 <asn1_ex_c2i+0x347>
cmpl   $0x0,-0x1c(%rbp)
je     1331 <asn1_ex_c2i+0x181>
mov    0x2cbc(%rip),%rax
mov    (%rax),%edi
mov    0x2cd3(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
jmp    1522 <asn1_ex_c2i+0x372>
mov    -0x10(%rbp),%rax
mov    $0x1,%ecx
mov    %rcx,(%rax)
jmp    14f7 <asn1_ex_c2i+0x347>
cmpl   $0x1,-0x1c(%rbp)
je     1368 <asn1_ex_c2i+0x1b8>
mov    0x2c85(%rip),%rax
mov    (%rax),%edi
mov    0x2c64(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
jmp    1522 <asn1_ex_c2i+0x372>
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x68(%rbp),%rax
mov    %cl,(%rax)
jmp    14f7 <asn1_ex_c2i+0x347>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    -0x18(%rbp),%rsi
call   1070 <c2i_ASN1_BIT_STRING@plt>
cmp    $0x0,%eax
jne    139f <asn1_ex_c2i+0x1ef>
jmp    1522 <asn1_ex_c2i+0x372>
jmp    14f7 <asn1_ex_c2i+0x347>
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    -0x18(%rbp),%rsi
call   10b0 <c2i_ASN1_INTEGER@plt>
cmp    $0x0,%eax
jne    13ca <asn1_ex_c2i+0x21a>
jmp    1522 <asn1_ex_c2i+0x372>
mov    -0x20(%rbp),%ecx
mov    -0x60(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
mov    0x2c03(%rip),%rdx
and    (%rdx),%eax
or     %eax,%ecx
mov    -0x60(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
jmp    14f7 <asn1_ex_c2i+0x347>
jmp    13f4 <asn1_ex_c2i+0x244>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1445 <asn1_ex_c2i+0x295>
mov    -0x20(%rbp),%edi
call   10c0 <ASN1_STRING_type_new@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1435 <asn1_ex_c2i+0x285>
mov    0x2bb8(%rip),%rax
mov    (%rax),%edi
mov    0x2ba7(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
jmp    1522 <asn1_ex_c2i+0x372>
mov    -0x40(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    1459 <asn1_ex_c2i+0x2a9>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x40(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     14a4 <asn1_ex_c2i+0x2f4>
mov    -0x40(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     1482 <asn1_ex_c2i+0x2d2>
mov    -0x40(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <OPENSSL_free@plt>
mov    -0x18(%rbp),%rcx
mov    -0x40(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x40(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
jmp    14f2 <asn1_ex_c2i+0x342>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   10a0 <ASN1_STRING_set@plt>
cmp    $0x0,%eax
jne    14ed <asn1_ex_c2i+0x33d>
mov    0x2b14(%rip),%rax
mov    (%rax),%edi
mov    0x2b03(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
mov    -0x40(%rbp),%rdi
call   1050 <ASN1_STRING_free@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
jmp    1522 <asn1_ex_c2i+0x372>
jmp    14f2 <asn1_ex_c2i+0x342>
jmp    14f7 <asn1_ex_c2i+0x347>
cmpq   $0x0,-0x48(%rbp)
je     151b <asn1_ex_c2i+0x36b>
cmpl   $0x8d,-0x20(%rbp)
jne    151b <asn1_ex_c2i+0x36b>
mov    -0x48(%rbp),%rax
movq   $0x0,0x8(%rax)
movl   $0x1,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jne    1550 <asn1_ex_c2i+0x3a0>
mov    -0x48(%rbp),%rdi
call   1060 <ASN1_TYPE_free@plt>
cmpq   $0x0,-0x38(%rbp)
je     154b <asn1_ex_c2i+0x39b>
mov    -0x38(%rbp),%rax
movq   $0x0,(%rax)
jmp    1550 <asn1_ex_c2i+0x3a0>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asn1_ex_c2i>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8,%rbp
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,0x8(%rsp)
mov    0x8(%r9),%rax
test   %rax,%rax
je     1202 <asn1_ex_c2i+0x52>
mov    (%rax),%rax
test   %rax,%rax
je     1202 <asn1_ex_c2i+0x52>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %rbp,%r8
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    *%rax
mov    (%r9),%rax
mov    0x2dac(%rip),%rcx
xor    %esi,%esi
cmp    (%rcx),%rax
jne    1240 <asn1_ex_c2i+0x90>
mov    (%rbx),%rsi
test   %rsi,%rsi
je     129f <asn1_ex_c2i+0xef>
cmp    %r15d,(%rsi)
je     1237 <asn1_ex_c2i+0x87>
mov    %rsi,%rdi
mov    %rsi,%r13
mov    %r15d,%esi
xor    %edx,%edx
call   10d0 <ASN1_TYPE_set@plt>
mov    %r13,%rsi
mov    %rbx,%rdx
lea    0x8(%rsi),%rbx
jmp    1242 <asn1_ex_c2i+0x92>
xor    %edx,%edx
lea    -0x8b(%r15),%eax
cmp    $0xd,%eax
ja     12df <asn1_ex_c2i+0x12f>
lea    0xda7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    %rsi,%rbp
mov    %rdx,(%rsp)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
call   10b0 <c2i_ASN1_INTEGER@plt>
test   %eax,%eax
je     1435 <asn1_ex_c2i+0x285>
mov    (%rbx),%rax
mov    0x2d55(%rip),%rcx
mov    (%rcx),%ecx
and    (%rax),%ecx
or     %r15d,%ecx
mov    %ecx,(%rax)
mov    $0x1,%r13d
jmp    1450 <asn1_ex_c2i+0x2a0>
xor    %r13d,%r13d
xor    %eax,%eax
call   1030 <ASN1_TYPE_new@plt>
test   %rax,%rax
je     135e <asn1_ex_c2i+0x1ae>
mov    %rax,%rsi
mov    %rax,(%rbx)
cmp    %r15d,(%rsi)
jne    1224 <asn1_ex_c2i+0x74>
jmp    1237 <asn1_ex_c2i+0x87>
mov    %rsi,%rbp
mov    %rdx,(%rsp)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
call   1090 <c2i_ASN1_OBJECT@plt>
jmp    134b <asn1_ex_c2i+0x19b>
mov    %rbp,0x10(%rsp)
mov    (%rbx),%r13
test   %r13,%r13
je     1386 <asn1_ex_c2i+0x1d6>
mov    %r15d,0x0(%r13)
jmp    13ab <asn1_ex_c2i+0x1fb>
test   %r12d,%r12d
je     13db <asn1_ex_c2i+0x22b>
mov    %rsi,%rbp
mov    %rdx,(%rsp)
mov    0x2cc8(%rip),%rax
mov    (%rax),%edi
mov    0x2cdf(%rip),%rax
jmp    142e <asn1_ex_c2i+0x27e>
cmp    $0x1,%r12d
jne    136a <asn1_ex_c2i+0x1ba>
mov    (%r14),%al
mov    %al,(%rbx)
mov    $0x1,%r13d
jmp    1450 <asn1_ex_c2i+0x2a0>
mov    %rsi,%rbp
mov    %rdx,(%rsp)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
call   1070 <c2i_ASN1_BIT_STRING@plt>
mov    $0x1,%r13d
test   %eax,%eax
jne    1450 <asn1_ex_c2i+0x2a0>
jmp    1435 <asn1_ex_c2i+0x285>
xor    %edi,%edi
call   1060 <ASN1_TYPE_free@plt>
jmp    1450 <asn1_ex_c2i+0x2a0>
mov    %rsi,%rbp
mov    %rdx,(%rsp)
mov    0x2c60(%rip),%rax
mov    (%rax),%edi
mov    0x2c3f(%rip),%rax
jmp    142e <asn1_ex_c2i+0x27e>
mov    %rsi,%rbp
mov    %rdx,(%rsp)
mov    %r15d,%edi
call   10c0 <ASN1_STRING_type_new@plt>
test   %rax,%rax
je     141e <asn1_ex_c2i+0x26e>
mov    %rax,%r13
mov    %rax,(%rbx)
mov    (%rsp),%rdx
mov    %rbp,%rsi
mov    0x10(%rsp),%rax
cmpb   $0x0,(%rax)
je     13e4 <asn1_ex_c2i+0x234>
mov    0x8(%r13),%rdi
test   %rdi,%rdi
je     13c9 <asn1_ex_c2i+0x219>
mov    %rsi,%rbx
call   1080 <OPENSSL_free@plt>
mov    %rbx,%rsi
mov    %r14,0x8(%r13)
mov    %r12d,0x10(%r13)
mov    0x10(%rsp),%rax
movb   $0x0,(%rax)
jmp    1400 <asn1_ex_c2i+0x250>
movq   $0x1,(%rbx)
jmp    1400 <asn1_ex_c2i+0x250>
mov    %rdx,(%rsp)
mov    %r13,%rdi
mov    %rsi,%rbp
mov    %r14,%rsi
mov    %r12d,%edx
call   10a0 <ASN1_STRING_set@plt>
mov    %rbp,%rsi
test   %eax,%eax
je     1462 <asn1_ex_c2i+0x2b2>
mov    $0x1,%r13d
cmp    $0x8d,%r15d
jne    1450 <asn1_ex_c2i+0x2a0>
test   %rsi,%rsi
je     1450 <asn1_ex_c2i+0x2a0>
movq   $0x0,0x8(%rsi)
jmp    1450 <asn1_ex_c2i+0x2a0>
mov    0x2bb3(%rip),%rax
mov    (%rax),%edi
mov    0x2ba2(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
mov    %rbp,%rdi
call   1060 <ASN1_TYPE_free@plt>
xor    %r13d,%r13d
mov    (%rsp),%rax
test   %rax,%rax
je     1450 <asn1_ex_c2i+0x2a0>
movq   $0x0,(%rax)
mov    %r13d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b6f(%rip),%rax
mov    (%rax),%edi
mov    0x2b5e(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
mov    %r13,%rdi
call   1050 <ASN1_STRING_free@plt>
movq   $0x0,(%rbx)
jmp    1435 <asn1_ex_c2i+0x285>

LLVM IR (-O0):
%struct.TYPE_20__ = type { i64, %struct.TYPE_19__* }
%struct.TYPE_19__ = type { {}* }
%struct.TYPE_18__ = type { i32, i8*, i32 }
%struct.TYPE_17__ = type { i32, %struct.TYPE_16__ }
%struct.TYPE_16__ = type { i32* }
%struct.TYPE_21__ = type { i32 }
@V_ASN1_ANY = global i64 0
@ASN1_F_ASN1_EX_C2I = global i32 0
@ASN1_R_NULL_IS_WRONG_LENGTH = global i32 0
@ASN1_R_BOOLEAN_IS_WRONG_LENGTH = global i32 0
@V_ASN1_NEG = global i32 0
@ERR_R_MALLOC_FAILURE = global i32 0
define i32 @asn1_ex_c2i(i32** %0, i8* %1, i32 %2, i32 %3, i8* %4, %struct.TYPE_20__* %5) {
%7 = alloca i32
%8 = alloca i32**
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca %struct.TYPE_20__*
%14 = alloca i32**
%15 = alloca %struct.TYPE_18__*
%16 = alloca %struct.TYPE_17__*
%17 = alloca i32
%18 = alloca %struct.TYPE_19__*
%19 = alloca %struct.TYPE_21__**
%20 = alloca i8*
store i32** %0, i32*** %8
store i8* %1, i8** %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store %struct.TYPE_20__* %5, %struct.TYPE_20__** %13
store i32** null, i32*** %14
store %struct.TYPE_17__* null, %struct.TYPE_17__** %16
store i32 0, i32* %17
%21 = load %struct.TYPE_20__*, %struct.TYPE_20__** %13
%22 = getelementptr inbounds %struct.TYPE_20__, %struct.TYPE_20__* %21, i32 0, i32 1
%23 = load %struct.TYPE_19__*, %struct.TYPE_19__** %22
store %struct.TYPE_19__* %23, %struct.TYPE_19__** %18
%24 = load %struct.TYPE_19__*, %struct.TYPE_19__** %18
%25 = icmp ne %struct.TYPE_19__* %24, null
br i1 %25, label %26, label %44
26: ; preds = %6
%27 = load %struct.TYPE_19__*, %struct.TYPE_19__** %18
%28 = getelementptr inbounds %struct.TYPE_19__, %struct.TYPE_19__* %27, i32 0, i32 0
%29 = bitcast {}** %28 to i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)**
%30 = load i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)*, i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)** %29
%31 = icmp ne i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)* %30, null
br i1 %31, label %32, label %44
32: ; preds = %26
%33 = load %struct.TYPE_19__*, %struct.TYPE_19__** %18
%34 = getelementptr inbounds %struct.TYPE_19__, %struct.TYPE_19__* %33, i32 0, i32 0
%35 = bitcast {}** %34 to i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)**
%36 = load i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)*, i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)** %35
%37 = load i32**, i32*** %8
%38 = load i8*, i8** %9
%39 = load i32, i32* %10
%40 = load i32, i32* %11
%41 = load i8*, i8** %12
%42 = load %struct.TYPE_20__*, %struct.TYPE_20__** %13
%43 = call i32 %36(i32** %37, i8* %38, i32 %39, i32 %40, i8* %41, %struct.TYPE_20__* %42)
store i32 %43, i32* %7
br label %227
44: ; preds = %26, %6
%45 = load %struct.TYPE_20__*, %struct.TYPE_20__** %13
%46 = getelementptr inbounds %struct.TYPE_20__, %struct.TYPE_20__* %45, i32 0, i32 0
%47 = load i64, i64* %46
%48 = load i64, i64* @V_ASN1_ANY
%49 = icmp eq i64 %47, %48
br i1 %49, label %50, label %82
50: ; preds = %44
%51 = load i32**, i32*** %8
%52 = load i32*, i32** %51
%53 = icmp ne i32* %52, null
br i1 %53, label %63, label %54
54: ; preds = %50
%55 = call %struct.TYPE_17__* (...) @ASN1_TYPE_new()
store %struct.TYPE_17__* %55, %struct.TYPE_17__** %16
%56 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%57 = icmp eq %struct.TYPE_17__* %56, null
br i1 %57, label %58, label %59
58: ; preds = %54
br label %214
59: ; preds = %54
%60 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%61 = bitcast %struct.TYPE_17__* %60 to i32*
%62 = load i32**, i32*** %8
store i32* %61, i32** %62
br label %67
63: ; preds = %50
%64 = load i32**, i32*** %8
%65 = load i32*, i32** %64
%66 = bitcast i32* %65 to %struct.TYPE_17__*
store %struct.TYPE_17__* %66, %struct.TYPE_17__** %16
br label %67
67: ; preds = %63, %59
%68 = load i32, i32* %11
%69 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%70 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %69, i32 0, i32 0
%71 = load i32, i32* %70
%72 = icmp ne i32 %68, %71
br i1 %72, label %73, label %77
73: ; preds = %67
%74 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%75 = load i32, i32* %11
%76 = call i32 @ASN1_TYPE_set(%struct.TYPE_17__* %74, i32 %75, i32* null)
br label %77
77: ; preds = %73, %67
%78 = load i32**, i32*** %8
store i32** %78, i32*** %14
%79 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%80 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %79, i32 0, i32 1
%81 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %80, i32 0, i32 0
store i32** %81, i32*** %8
br label %82
82: ; preds = %77, %44
%83 = load i32, i32* %11
switch i32 %83, label %142 [
i32 139, label %84
i32 141, label %91
i32 150, label %100
i32 152, label %114
i32 144, label %121
i32 142, label %121
i32 149, label %121
i32 143, label %121
i32 138, label %141
i32 140, label %141
i32 136, label %141
i32 133, label %141
i32 129, label %141
i32 145, label %141
i32 131, label %141
i32 148, label %141
i32 146, label %141
i32 128, label %141
i32 147, label %141
i32 132, label %141
i32 151, label %141
i32 130, label %141
i32 137, label %141
i32 134, label %141
i32 135, label %141
]
84: ; preds = %82
%85 = load i32**, i32*** %8
%86 = load i32, i32* %10
%87 = call i32 @c2i_ASN1_OBJECT(i32** %85, i8** %9, i32 %86)
%88 = icmp ne i32 %87, 0
br i1 %88, label %90, label %89
89: ; preds = %84
br label %214
90: ; preds = %84
br label %203
91: ; preds = %82
%92 = load i32, i32* %10
%93 = icmp ne i32 %92, 0
br i1 %93, label %94, label %98
94: ; preds = %91
%95 = load i32, i32* @ASN1_F_ASN1_EX_C2I
%96 = load i32, i32* @ASN1_R_NULL_IS_WRONG_LENGTH
%97 = call i32 @ASN1err(i32 %95, i32 %96)
br label %214
98: ; preds = %91
%99 = load i32**, i32*** %8
store i32* inttoptr (i64 1 to i32*), i32** %99
br label %203
100: ; preds = %82
%101 = load i32, i32* %10
%102 = icmp ne i32 %101, 1
br i1 %102, label %103, label %107
103: ; preds = %100
%104 = load i32, i32* @ASN1_F_ASN1_EX_C2I
%105 = load i32, i32* @ASN1_R_BOOLEAN_IS_WRONG_LENGTH
%106 = call i32 @ASN1err(i32 %104, i32 %105)
br label %214
107: ; preds = %100
%108 = load i32**, i32*** %8
%109 = bitcast i32** %108 to i8*
store i8* %109, i8** %20
%110 = load i8*, i8** %9
%111 = load i8, i8* %110
%112 = load i8*, i8** %20
store i8 %111, i8* %112
br label %113
113: ; preds = %107
br label %203
114: ; preds = %82
%115 = load i32**, i32*** %8
%116 = load i32, i32* %10
%117 = call i32 @c2i_ASN1_BIT_STRING(i32** %115, i8** %9, i32 %116)
%118 = icmp ne i32 %117, 0
br i1 %118, label %120, label %119
119: ; preds = %114
br label %214
120: ; preds = %114
br label %203
121: ; preds = %82, %82, %82, %82
%122 = load i32**, i32*** %8
%123 = bitcast i32** %122 to %struct.TYPE_21__**
store %struct.TYPE_21__** %123, %struct.TYPE_21__*** %19
%124 = load %struct.TYPE_21__**, %struct.TYPE_21__*** %19
%125 = load i32, i32* %10
%126 = call i32 @c2i_ASN1_INTEGER(%struct.TYPE_21__** %124, i8** %9, i32 %125)
%127 = icmp ne i32 %126, 0
br i1 %127, label %129, label %128
128: ; preds = %121
br label %214
129: ; preds = %121
%130 = load i32, i32* %11
%131 = load %struct.TYPE_21__**, %struct.TYPE_21__*** %19
%132 = load %struct.TYPE_21__*, %struct.TYPE_21__** %131
%133 = getelementptr inbounds %struct.TYPE_21__, %struct.TYPE_21__* %132, i32 0, i32 0
%134 = load i32, i32* %133
%135 = load i32, i32* @V_ASN1_NEG
%136 = and i32 %134, %135
%137 = or i32 %130, %136
%138 = load %struct.TYPE_21__**, %struct.TYPE_21__*** %19
%139 = load %struct.TYPE_21__*, %struct.TYPE_21__** %138
%140 = getelementptr inbounds %struct.TYPE_21__, %struct.TYPE_21__* %139, i32 0, i32 0
store i32 %137, i32* %140
br label %203
141: ; preds = %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82
br label %142
142: ; preds = %82, %141
%143 = load i32**, i32*** %8
%144 = load i32*, i32** %143
%145 = icmp ne i32* %144, null
br i1 %145, label %159, label %146
146: ; preds = %142
%147 = load i32, i32* %11
%148 = call %struct.TYPE_18__* @ASN1_STRING_type_new(i32 %147)
store %struct.TYPE_18__* %148, %struct.TYPE_18__** %15
%149 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%150 = icmp ne %struct.TYPE_18__* %149, null
br i1 %150, label %155, label %151
151: ; preds = %146
%152 = load i32, i32* @ASN1_F_ASN1_EX_C2I
%153 = load i32, i32* @ERR_R_MALLOC_FAILURE
%154 = call i32 @ASN1err(i32 %152, i32 %153)
br label %214
155: ; preds = %146
%156 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%157 = bitcast %struct.TYPE_18__* %156 to i32*
%158 = load i32**, i32*** %8
store i32* %157, i32** %158
br label %166
159: ; preds = %142
%160 = load i32**, i32*** %8
%161 = load i32*, i32** %160
%162 = bitcast i32* %161 to %struct.TYPE_18__*
store %struct.TYPE_18__* %162, %struct.TYPE_18__** %15
%163 = load i32, i32* %11
%164 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%165 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %164, i32 0, i32 0
store i32 %163, i32* %165
br label %166
166: ; preds = %159, %155
%167 = load i8*, i8** %12
%168 = load i8, i8* %167
%169 = icmp ne i8 %168, 0
br i1 %169, label %170, label %188
170: ; preds = %166
%171 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%172 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %171, i32 0, i32 1
%173 = load i8*, i8** %172
%174 = icmp ne i8* %173, null
br i1 %174, label %175, label %180
175: ; preds = %170
%176 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%177 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %176, i32 0, i32 1
%178 = load i8*, i8** %177
%179 = call i32 @OPENSSL_free(i8* %178)
br label %180
180: ; preds = %175, %170
%181 = load i8*, i8** %9
%182 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%183 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %182, i32 0, i32 1
store i8* %181, i8** %183
%184 = load i32, i32* %10
%185 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%186 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %185, i32 0, i32 2
store i32 %184, i32* %186
%187 = load i8*, i8** %12
store i8 0, i8* %187
br label %202
188: ; preds = %166
%189 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%190 = load i8*, i8** %9
%191 = load i32, i32* %10
%192 = call i32 @ASN1_STRING_set(%struct.TYPE_18__* %189, i8* %190, i32 %191)
%193 = icmp ne i32 %192, 0
br i1 %193, label %201, label %194
194: ; preds = %188
%195 = load i32, i32* @ASN1_F_ASN1_EX_C2I
%196 = load i32, i32* @ERR_R_MALLOC_FAILURE
%197 = call i32 @ASN1err(i32 %195, i32 %196)
%198 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%199 = call i32 @ASN1_STRING_free(%struct.TYPE_18__* %198)
%200 = load i32**, i32*** %8
store i32* null, i32** %200
br label %214
201: ; preds = %188
br label %202
202: ; preds = %201, %180
br label %203
203: ; preds = %202, %129, %120, %113, %98, %90
%204 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%205 = icmp ne %struct.TYPE_17__* %204, null
br i1 %205, label %206, label %213
206: ; preds = %203
%207 = load i32, i32* %11
%208 = icmp eq i32 %207, 141
br i1 %208, label %209, label %213
209: ; preds = %206
%210 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%211 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %210, i32 0, i32 1
%212 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %211, i32 0, i32 0
store i32* null, i32** %212
br label %213
213: ; preds = %209, %206, %203
store i32 1, i32* %17
br label %214
214: ; preds = %213, %194, %151, %128, %119, %103, %94, %89, %58
%215 = load i32, i32* %17
%216 = icmp ne i32 %215, 0
br i1 %216, label %225, label %217
217: ; preds = %214
%218 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%219 = call i32 @ASN1_TYPE_free(%struct.TYPE_17__* %218)
%220 = load i32**, i32*** %14
%221 = icmp ne i32** %220, null
br i1 %221, label %222, label %224
222: ; preds = %217
%223 = load i32**, i32*** %14
store i32* null, i32** %223
br label %224
224: ; preds = %222, %217
br label %225
225: ; preds = %224, %214
%226 = load i32, i32* %17
store i32 %226, i32* %7
br label %227
227: ; preds = %225, %32
%228 = load i32, i32* %7
ret i32 %228
}

LLVM IR (-O2):
%struct.TYPE_20__ = type { i64, %struct.TYPE_19__* }
%struct.TYPE_19__ = type { {}* }
%struct.TYPE_17__ = type { i32, %struct.TYPE_16__ }
%struct.TYPE_16__ = type { i32* }
%struct.TYPE_21__ = type { i32 }
%struct.TYPE_18__ = type { i32, i8*, i32 }
@V_ASN1_ANY = global i64 0
@ASN1_F_ASN1_EX_C2I = global i32 0
@ASN1_R_NULL_IS_WRONG_LENGTH = global i32 0
@ASN1_R_BOOLEAN_IS_WRONG_LENGTH = global i32 0
@V_ASN1_NEG = global i32 0
@ERR_R_MALLOC_FAILURE = global i32 0
define i32 @asn1_ex_c2i(i32** %0, i8* %1, i32 %2, i32 %3, i8* %4, %struct.TYPE_20__* %5) {
%7 = alloca i8*
store i8* %1, i8** %7
%8 = getelementptr inbounds %struct.TYPE_20__, %struct.TYPE_20__* %5, i64 0, i32 1
%9 = load %struct.TYPE_19__*, %struct.TYPE_19__** %8
%10 = icmp eq %struct.TYPE_19__* %9, null
br i1 %10, label %17, label %11
11: ; preds = %6
%12 = bitcast %struct.TYPE_19__* %9 to i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)**
%13 = load i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)*, i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)** %12
%14 = icmp eq i32 (i32**, i8*, i32, i32, i8*, %struct.TYPE_20__*)* %13, null
br i1 %14, label %17, label %15
15: ; preds = %11
%16 = tail call i32 %13(i32** %0, i8* %1, i32 %2, i32 %3, i8* %4, %struct.TYPE_20__* %5)
br label %124
17: ; preds = %11, %6
%18 = getelementptr inbounds %struct.TYPE_20__, %struct.TYPE_20__* %5, i64 0, i32 0
%19 = load i64, i64* %18
%20 = load i64, i64* @V_ASN1_ANY
%21 = icmp eq i64 %19, %20
br i1 %21, label %22, label %43
22: ; preds = %17
%23 = load i32*, i32** %0
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %32
25: ; preds = %22
%26 = tail call %struct.TYPE_17__* (...) @ASN1_TYPE_new()
%27 = icmp eq %struct.TYPE_17__* %26, null
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = tail call i32 @ASN1_TYPE_free(%struct.TYPE_17__* null)
br label %124
30: ; preds = %25
%31 = getelementptr %struct.TYPE_17__, %struct.TYPE_17__* %26, i64 0, i32 0
store i32* %31, i32** %0
br label %34
32: ; preds = %22
%33 = bitcast i32* %23 to %struct.TYPE_17__*
br label %34
34: ; preds = %32, %30
%35 = phi %struct.TYPE_17__* [ %33, %32 ], [ %26, %30 ]
%36 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %35, i64 0, i32 0
%37 = load i32, i32* %36
%38 = icmp eq i32 %37, %3
br i1 %38, label %41, label %39
39: ; preds = %34
%40 = tail call i32 @ASN1_TYPE_set(%struct.TYPE_17__* %35, i32 %3, i32* null)
br label %41
41: ; preds = %39, %34
%42 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %35, i64 0, i32 1, i32 0
br label %43
43: ; preds = %41, %17
%44 = phi %struct.TYPE_17__* [ %35, %41 ], [ null, %17 ]
%45 = phi i32** [ %0, %41 ], [ null, %17 ]
%46 = phi i32** [ %42, %41 ], [ %0, %17 ]
switch i32 %3, label %80 [
i32 139, label %47
i32 141, label %50
i32 150, label %57
i32 152, label %66
i32 144, label %69
i32 142, label %69
i32 149, label %69
i32 143, label %69
]
47: ; preds = %43
%48 = call i32 @c2i_ASN1_OBJECT(i32** %46, i8** %7, i32 %2)
%49 = icmp eq i32 %48, 0
br i1 %49, label %120, label %124
50: ; preds = %43
%51 = icmp eq i32 %2, 0
br i1 %51, label %56, label %52
52: ; preds = %50
%53 = load i32, i32* @ASN1_F_ASN1_EX_C2I
%54 = load i32, i32* @ASN1_R_NULL_IS_WRONG_LENGTH
%55 = tail call i32 @ASN1err(i32 %53, i32 %54)
br label %120
56: ; preds = %50
store i32* inttoptr (i64 1 to i32*), i32** %46
br label %114
57: ; preds = %43
%58 = icmp eq i32 %2, 1
br i1 %58, label %63, label %59
59: ; preds = %57
%60 = load i32, i32* @ASN1_F_ASN1_EX_C2I
%61 = load i32, i32* @ASN1_R_BOOLEAN_IS_WRONG_LENGTH
%62 = tail call i32 @ASN1err(i32 %60, i32 %61)
br label %120
63: ; preds = %57
%64 = bitcast i32** %46 to i8*
%65 = load i8, i8* %1
store i8 %65, i8* %64
br label %124
66: ; preds = %43
%67 = call i32 @c2i_ASN1_BIT_STRING(i32** %46, i8** %7, i32 %2)
%68 = icmp eq i32 %67, 0
br i1 %68, label %120, label %124
69: ; preds = %43, %43, %43, %43
%70 = bitcast i32** %46 to %struct.TYPE_21__**
%71 = call i32 @c2i_ASN1_INTEGER(%struct.TYPE_21__** %70, i8** %7, i32 %2)
%72 = icmp eq i32 %71, 0
br i1 %72, label %120, label %73
73: ; preds = %69
%74 = load %struct.TYPE_21__*, %struct.TYPE_21__** %70
%75 = getelementptr inbounds %struct.TYPE_21__, %struct.TYPE_21__* %74, i64 0, i32 0
%76 = load i32, i32* %75
%77 = load i32, i32* @V_ASN1_NEG
%78 = and i32 %77, %76
%79 = or i32 %78, %3
store i32 %79, i32* %75
br label %124
80: ; preds = %43
%81 = load i32*, i32** %46
%82 = icmp eq i32* %81, null
br i1 %82, label %83, label %92
83: ; preds = %80
%84 = tail call %struct.TYPE_18__* @ASN1_STRING_type_new(i32 %3)
%85 = icmp eq %struct.TYPE_18__* %84, null
br i1 %85, label %86, label %90
86: ; preds = %83
%87 = load i32, i32* @ASN1_F_ASN1_EX_C2I
%88 = load i32, i32* @ERR_R_MALLOC_FAILURE
%89 = tail call i32 @ASN1err(i32 %87, i32 %88)
br label %120
90: ; preds = %83
%91 = getelementptr %struct.TYPE_18__, %struct.TYPE_18__* %84, i64 0, i32 0
store i32* %91, i32** %46
br label %94
92: ; preds = %80
%93 = bitcast i32* %81 to %struct.TYPE_18__*
store i32 %3, i32* %81
br label %94
94: ; preds = %92, %90
%95 = phi %struct.TYPE_18__* [ %93, %92 ], [ %84, %90 ]
%96 = load i8, i8* %4
%97 = icmp eq i8 %96, 0
br i1 %97, label %106, label %98
98: ; preds = %94
%99 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %95, i64 0, i32 1
%100 = load i8*, i8** %99
%101 = icmp eq i8* %100, null
br i1 %101, label %104, label %102
102: ; preds = %98
%103 = tail call i32 @OPENSSL_free(i8* %100)
br label %104
104: ; preds = %102, %98
store i8* %1, i8** %99
%105 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %95, i64 0, i32 2
store i32 %2, i32* %105
store i8 0, i8* %4
br label %114
106: ; preds = %94
%107 = tail call i32 @ASN1_STRING_set(%struct.TYPE_18__* %95, i8* %1, i32 %2)
%108 = icmp eq i32 %107, 0
br i1 %108, label %109, label %114
109: ; preds = %106
%110 = load i32, i32* @ASN1_F_ASN1_EX_C2I
%111 = load i32, i32* @ERR_R_MALLOC_FAILURE
%112 = tail call i32 @ASN1err(i32 %110, i32 %111)
%113 = tail call i32 @ASN1_STRING_free(%struct.TYPE_18__* %95)
store i32* null, i32** %46
br label %120
114: ; preds = %104, %106, %56
%115 = icmp ne %struct.TYPE_17__* %44, null
%116 = icmp eq i32 %3, 141
%117 = and i1 %116, %115
br i1 %117, label %118, label %124
118: ; preds = %114
%119 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %44, i64 0, i32 1, i32 0
store i32* null, i32** %119
br label %124
120: ; preds = %109, %86, %69, %66, %59, %52, %47
%121 = call i32 @ASN1_TYPE_free(%struct.TYPE_17__* %44)
%122 = icmp eq i32** %45, null
br i1 %122, label %124, label %123
123: ; preds = %120
store i32* null, i32** %45
br label %124
124: ; preds = %63, %73, %47, %66, %28, %118, %114, %123, %120, %15
%125 = phi i32 [ %16, %15 ], [ 0, %120 ], [ 0, %123 ], [ 1, %118 ], [ 1, %114 ], [ 0, %28 ], [ 1, %66 ], [ 1, %47 ], [ 1, %73 ], [ 1, %63 ]
ret i32 %125
}