#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();
      *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    1546 <asn1_ex_c2i+0x396>
mov    -0x30(%rbp),%rax
mov    (%rax),%rax
mov    0x2d79(%rip),%rcx
cmp    (%rcx),%rax
jne    12af <asn1_ex_c2i+0xff>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1271 <asn1_ex_c2i+0xc1>
mov    $0x0,%al
call   1030 <ASN1_TYPE_new@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    127c <asn1_ex_c2i+0xcc>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x48(%rbp),%rcx
cmp    (%rcx),%eax
je     129b <asn1_ex_c2i+0xeb>
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     13e4 <asn1_ex_c2i+0x234>
mov    -0x70(%rbp),%rax
lea    0xd31(%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    12f6 <asn1_ex_c2i+0x146>
jmp    1512 <asn1_ex_c2i+0x362>
jmp    14e7 <asn1_ex_c2i+0x337>
cmpl   $0x0,-0x1c(%rbp)
je     1321 <asn1_ex_c2i+0x171>
mov    0x2ccc(%rip),%rax
mov    (%rax),%edi
mov    0x2ce3(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
jmp    1512 <asn1_ex_c2i+0x362>
mov    -0x10(%rbp),%rax
mov    $0x1,%ecx
mov    %rcx,(%rax)
jmp    14e7 <asn1_ex_c2i+0x337>
cmpl   $0x1,-0x1c(%rbp)
je     1358 <asn1_ex_c2i+0x1a8>
mov    0x2c95(%rip),%rax
mov    (%rax),%edi
mov    0x2c74(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
jmp    1512 <asn1_ex_c2i+0x362>
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x68(%rbp),%rax
mov    %cl,(%rax)
jmp    14e7 <asn1_ex_c2i+0x337>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    -0x18(%rbp),%rsi
call   1070 <c2i_ASN1_BIT_STRING@plt>
cmp    $0x0,%eax
jne    138f <asn1_ex_c2i+0x1df>
jmp    1512 <asn1_ex_c2i+0x362>
jmp    14e7 <asn1_ex_c2i+0x337>
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    13ba <asn1_ex_c2i+0x20a>
jmp    1512 <asn1_ex_c2i+0x362>
mov    -0x20(%rbp),%ecx
mov    -0x60(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
mov    0x2c13(%rip),%rdx
and    (%rdx),%eax
or     %eax,%ecx
mov    -0x60(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
jmp    14e7 <asn1_ex_c2i+0x337>
jmp    13e4 <asn1_ex_c2i+0x234>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1435 <asn1_ex_c2i+0x285>
mov    -0x20(%rbp),%edi
call   10c0 <ASN1_STRING_type_new@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1425 <asn1_ex_c2i+0x275>
mov    0x2bc8(%rip),%rax
mov    (%rax),%edi
mov    0x2bb7(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
jmp    1512 <asn1_ex_c2i+0x362>
mov    -0x40(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    1449 <asn1_ex_c2i+0x299>
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     1494 <asn1_ex_c2i+0x2e4>
mov    -0x40(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     1472 <asn1_ex_c2i+0x2c2>
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    14e2 <asn1_ex_c2i+0x332>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   10a0 <ASN1_STRING_set@plt>
cmp    $0x0,%eax
jne    14dd <asn1_ex_c2i+0x32d>
mov    0x2b24(%rip),%rax
mov    (%rax),%edi
mov    0x2b13(%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    1512 <asn1_ex_c2i+0x362>
jmp    14e2 <asn1_ex_c2i+0x332>
jmp    14e7 <asn1_ex_c2i+0x337>
cmpq   $0x0,-0x48(%rbp)
je     150b <asn1_ex_c2i+0x35b>
cmpl   $0x8d,-0x20(%rbp)
jne    150b <asn1_ex_c2i+0x35b>
mov    -0x48(%rbp),%rax
movq   $0x0,0x8(%rax)
movl   $0x1,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jne    1540 <asn1_ex_c2i+0x390>
mov    -0x48(%rbp),%rdi
call   1060 <ASN1_TYPE_free@plt>
cmpq   $0x0,-0x38(%rbp)
je     153b <asn1_ex_c2i+0x38b>
mov    -0x38(%rbp),%rax
movq   $0x0,(%rax)
jmp    1540 <asn1_ex_c2i+0x390>
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,%r13
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    %rsi,0x10(%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    %rbp,%rsi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %r13,%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    %r14d,%r14d
cmp    (%rcx),%rax
jne    1244 <asn1_ex_c2i+0x94>
mov    (%rbx),%r14
test   %r14,%r14
jne    1229 <asn1_ex_c2i+0x79>
xor    %eax,%eax
call   1030 <ASN1_TYPE_new@plt>
mov    %rax,%r14
mov    %rax,(%rbx)
cmp    %r15d,(%r14)
je     123b <asn1_ex_c2i+0x8b>
mov    %r14,%rdi
mov    %r15d,%esi
xor    %edx,%edx
call   10d0 <ASN1_TYPE_set@plt>
mov    %rbx,%rdx
lea    0x8(%r14),%rbx
jmp    1246 <asn1_ex_c2i+0x96>
xor    %edx,%edx
lea    -0x8b(%r15),%eax
cmp    $0xd,%eax
ja     12b6 <asn1_ex_c2i+0x106>
lea    0xda7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    %rdx,0x8(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
call   10b0 <c2i_ASN1_INTEGER@plt>
test   %eax,%eax
je     1413 <asn1_ex_c2i+0x263>
mov    (%rbx),%rax
mov    0x2d57(%rip),%rcx
mov    (%rcx),%ecx
and    (%rax),%ecx
or     %r15d,%ecx
mov    %ecx,(%rax)
mov    $0x1,%eax
jmp    142e <asn1_ex_c2i+0x27e>
mov    %rdx,0x8(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
call   1090 <c2i_ASN1_OBJECT@plt>
jmp    1343 <asn1_ex_c2i+0x193>
mov    (%rbx),%rax
test   %rax,%rax
je     1371 <asn1_ex_c2i+0x1c1>
mov    %r15d,(%rax)
cmpb   $0x0,0x0(%r13)
je     1396 <asn1_ex_c2i+0x1e6>
mov    0x8(%rax),%rdi
test   %rdi,%rdi
je     12e4 <asn1_ex_c2i+0x134>
mov    %rax,%rbx
call   1080 <OPENSSL_free@plt>
mov    %rbx,%rax
mov    %rbp,0x8(%rax)
mov    %r12d,0x10(%rax)
movb   $0x0,0x0(%r13)
jmp    13df <asn1_ex_c2i+0x22f>
test   %r12d,%r12d
je     13d8 <asn1_ex_c2i+0x228>
mov    %rdx,0x8(%rsp)
mov    0x2ccd(%rip),%rax
mov    (%rax),%edi
mov    0x2ce4(%rip),%rax
jmp    140c <asn1_ex_c2i+0x25c>
cmp    $0x1,%r12d
jne    1357 <asn1_ex_c2i+0x1a7>
mov    0x0(%rbp),%al
mov    %al,(%rbx)
mov    $0x1,%eax
jmp    142e <asn1_ex_c2i+0x27e>
mov    %rdx,0x8(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
call   1070 <c2i_ASN1_BIT_STRING@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
jne    142e <asn1_ex_c2i+0x27e>
jmp    1413 <asn1_ex_c2i+0x263>
mov    %rdx,0x8(%rsp)
mov    0x2c75(%rip),%rax
mov    (%rax),%edi
mov    0x2c54(%rip),%rax
jmp    140c <asn1_ex_c2i+0x25c>
mov    %rdx,0x8(%rsp)
mov    %r15d,%edi
call   10c0 <ASN1_STRING_type_new@plt>
test   %rax,%rax
je     13fc <asn1_ex_c2i+0x24c>
mov    %rax,(%rbx)
mov    0x8(%rsp),%rdx
cmpb   $0x0,0x0(%r13)
jne    12d0 <asn1_ex_c2i+0x120>
mov    %rdx,0x8(%rsp)
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r12d,%edx
mov    %rax,%rbp
call   10a0 <ASN1_STRING_set@plt>
test   %eax,%eax
jne    13df <asn1_ex_c2i+0x22f>
mov    0x2c21(%rip),%rax
mov    (%rax),%edi
mov    0x2c10(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
mov    %rbp,%rdi
call   1050 <ASN1_STRING_free@plt>
movq   $0x0,(%rbx)
jmp    1413 <asn1_ex_c2i+0x263>
movq   $0x1,(%rbx)
mov    $0x1,%eax
cmp    $0x8d,%r15d
jne    142e <asn1_ex_c2i+0x27e>
test   %r14,%r14
je     142e <asn1_ex_c2i+0x27e>
movq   $0x0,0x8(%r14)
jmp    142e <asn1_ex_c2i+0x27e>
mov    0x2bd5(%rip),%rax
mov    (%rax),%edi
mov    0x2bc4(%rip),%rax
mov    (%rax),%esi
call   1040 <ASN1err@plt>
mov    %r14,%rdi
call   1060 <ASN1_TYPE_free@plt>
xor    %eax,%eax
mov    0x8(%rsp),%rcx
test   %rcx,%rcx
je     142e <asn1_ex_c2i+0x27e>
movq   $0x0,(%rcx)
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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