#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;
  int /*<<< orphan*/ *asn1_value;
};
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_R_BMPSTRING_IS_WRONG_LENGTH;
int /*<<< orphan*/ ASN1_R_BOOLEAN_IS_WRONG_LENGTH;
int /*<<< orphan*/ ASN1_R_NULL_IS_WRONG_LENGTH;
int /*<<< orphan*/ ASN1_R_UNIVERSALSTRING_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*/ ASN1error(int /*<<< orphan*/);
int /*<<< orphan*/ ERR_R_MALLOC_FAILURE;
scalar_t__ V_ASN1_ANY;
#define V_ASN1_BIT_STRING 150
#define V_ASN1_BMPSTRING 149
#define V_ASN1_BOOLEAN 148
#define V_ASN1_ENUMERATED 147
#define V_ASN1_GENERALIZEDTIME 146
#define V_ASN1_GENERALSTRING 145
#define V_ASN1_GRAPHICSTRING 144
#define V_ASN1_IA5STRING 143
#define V_ASN1_INTEGER 142
int V_ASN1_NEG;
#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 /*<<< orphan*/ free(unsigned char *);
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 = &typ->value.asn1_value;
  }
  switch (utype) {
  case V_ASN1_OBJECT:
    if (!c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, len))
      goto err;
    break;
  case V_ASN1_NULL:
    if (len) {
      ASN1error(ASN1_R_NULL_IS_WRONG_LENGTH);
      goto err;
    }
    *pval = (ASN1_VALUE *)1;
    break;
  case V_ASN1_BOOLEAN:
    if (len != 1) {
      ASN1error(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_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 (utype == V_ASN1_BMPSTRING && (len & 1)) {
      ASN1error(ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
      goto err;
    }
    if (utype == V_ASN1_UNIVERSALSTRING && (len & 3)) {
      ASN1error(ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
      goto err;
    }
    if (!*pval) {
      stmp = ASN1_STRING_type_new(utype);
      if (!stmp) {
        ASN1error(ERR_R_MALLOC_FAILURE);
        goto err;
      }
      *pval = (ASN1_VALUE *)stmp;
    } else {
      stmp = (ASN1_STRING *)*pval;
      stmp->type = utype;
    }
    if (*free_cont) {
      free(stmp->data);
      stmp->data = (unsigned char *)cont;
      stmp->length = len;
      *free_cont = 0;
    } else {
      if (!ASN1_STRING_set(stmp, cont, len)) {
        ASN1error(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    1585 <asn1_ex_c2i+0x3d5>
mov    -0x30(%rbp),%rax
mov    (%rax),%rax
mov    0x2d71(%rip),%rcx
cmp    (%rcx),%rax
jne    12c3 <asn1_ex_c2i+0x113>
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    1551 <asn1_ex_c2i+0x3a1>
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   10c0 <ASN1_TYPE_set@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x48(%rbp),%rax
add    $0x8,%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x70(%rbp)
sub    $0x16,%eax
ja     13e6 <asn1_ex_c2i+0x236>
mov    -0x70(%rbp),%rax
lea    0xd1d(%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   1080 <c2i_ASN1_OBJECT@plt>
cmp    $0x0,%eax
jne    130a <asn1_ex_c2i+0x15a>
jmp    1551 <asn1_ex_c2i+0x3a1>
jmp    1526 <asn1_ex_c2i+0x376>
cmpl   $0x0,-0x1c(%rbp)
je     132c <asn1_ex_c2i+0x17c>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
call   10d0 <ASN1error@plt>
jmp    1551 <asn1_ex_c2i+0x3a1>
mov    -0x10(%rbp),%rax
mov    $0x1,%ecx
mov    %rcx,(%rax)
jmp    1526 <asn1_ex_c2i+0x376>
cmpl   $0x1,-0x1c(%rbp)
je     135a <asn1_ex_c2i+0x1aa>
mov    0x2c6a(%rip),%rax
mov    (%rax),%edi
call   10d0 <ASN1error@plt>
jmp    1551 <asn1_ex_c2i+0x3a1>
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x68(%rbp),%rax
mov    %cl,(%rax)
jmp    1526 <asn1_ex_c2i+0x376>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    -0x18(%rbp),%rsi
call   1070 <c2i_ASN1_BIT_STRING@plt>
cmp    $0x0,%eax
jne    1391 <asn1_ex_c2i+0x1e1>
jmp    1551 <asn1_ex_c2i+0x3a1>
jmp    1526 <asn1_ex_c2i+0x376>
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    -0x18(%rbp),%rsi
call   10a0 <c2i_ASN1_INTEGER@plt>
cmp    $0x0,%eax
jne    13bc <asn1_ex_c2i+0x20c>
jmp    1551 <asn1_ex_c2i+0x3a1>
mov    -0x20(%rbp),%ecx
mov    -0x60(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
mov    0x2c09(%rip),%rdx
and    (%rdx),%eax
or     %eax,%ecx
mov    -0x60(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
jmp    1526 <asn1_ex_c2i+0x376>
jmp    13e6 <asn1_ex_c2i+0x236>
cmpl   $0x95,-0x20(%rbp)
jne    1415 <asn1_ex_c2i+0x265>
mov    -0x1c(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1415 <asn1_ex_c2i+0x265>
mov    0x2bd7(%rip),%rax
mov    (%rax),%edi
call   10d0 <ASN1error@plt>
jmp    1551 <asn1_ex_c2i+0x3a1>
cmpl   $0x84,-0x20(%rbp)
jne    1444 <asn1_ex_c2i+0x294>
mov    -0x1c(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
je     1444 <asn1_ex_c2i+0x294>
mov    0x2b88(%rip),%rax
mov    (%rax),%edi
call   10d0 <ASN1error@plt>
jmp    1551 <asn1_ex_c2i+0x3a1>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    148c <asn1_ex_c2i+0x2dc>
mov    -0x20(%rbp),%edi
call   10b0 <ASN1_STRING_type_new@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    147c <asn1_ex_c2i+0x2cc>
mov    0x2b60(%rip),%rax
mov    (%rax),%edi
call   10d0 <ASN1error@plt>
jmp    1551 <asn1_ex_c2i+0x3a1>
mov    -0x40(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    14a0 <asn1_ex_c2i+0x2f0>
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     14dc <asn1_ex_c2i+0x32c>
mov    -0x40(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <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    1521 <asn1_ex_c2i+0x371>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1090 <ASN1_STRING_set@plt>
cmp    $0x0,%eax
jne    151c <asn1_ex_c2i+0x36c>
mov    0x2ad4(%rip),%rax
mov    (%rax),%edi
call   10d0 <ASN1error@plt>
mov    -0x40(%rbp),%rdi
call   1050 <ASN1_STRING_free@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
jmp    1551 <asn1_ex_c2i+0x3a1>
jmp    1521 <asn1_ex_c2i+0x371>
jmp    1526 <asn1_ex_c2i+0x376>
cmpq   $0x0,-0x48(%rbp)
je     154a <asn1_ex_c2i+0x39a>
cmpl   $0x8d,-0x20(%rbp)
jne    154a <asn1_ex_c2i+0x39a>
mov    -0x48(%rbp),%rax
movq   $0x0,0x8(%rax)
movl   $0x1,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jne    157f <asn1_ex_c2i+0x3cf>
mov    -0x48(%rbp),%rdi
call   1060 <ASN1_TYPE_free@plt>
cmpq   $0x0,-0x38(%rbp)
je     157a <asn1_ex_c2i+0x3ca>
mov    -0x38(%rbp),%rax
movq   $0x0,(%rax)
jmp    157f <asn1_ex_c2i+0x3cf>
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    0x2da4(%rip),%rcx
xor    %r14d,%r14d
cmp    (%rcx),%rax
jne    1237 <asn1_ex_c2i+0x87>
mov    (%rbx),%r14
test   %r14,%r14
je     1293 <asn1_ex_c2i+0xe3>
cmp    %r15d,(%r14)
je     122e <asn1_ex_c2i+0x7e>
mov    %r14,%rdi
mov    %r15d,%esi
xor    %edx,%edx
call   10c0 <ASN1_TYPE_set@plt>
mov    %rbx,%rdx
lea    0x10(%r14),%rbx
jmp    1239 <asn1_ex_c2i+0x89>
xor    %edx,%edx
lea    -0x84(%r15),%eax
cmp    $0x12,%eax
ja     132d <asn1_ex_c2i+0x17d>
lea    0xdb0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    %rdx,(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
call   10a0 <c2i_ASN1_INTEGER@plt>
test   %eax,%eax
je     1437 <asn1_ex_c2i+0x287>
mov    (%rbx),%rax
mov    0x2d59(%rip),%rcx
mov    (%rcx),%ecx
and    (%rax),%ecx
or     %r15d,%ecx
mov    %ecx,(%rax)
mov    $0x1,%r13d
jmp    1452 <asn1_ex_c2i+0x2a2>
mov    %r13,0x8(%rsp)
xor    %r13d,%r13d
xor    %eax,%eax
call   1030 <ASN1_TYPE_new@plt>
test   %rax,%rax
je     1367 <asn1_ex_c2i+0x1b7>
mov    %rax,%r14
mov    %rax,(%rbx)
mov    0x8(%rsp),%r13
cmp    %r15d,(%r14)
jne    1221 <asn1_ex_c2i+0x71>
jmp    122e <asn1_ex_c2i+0x7e>
test   $0x3,%r12b
je     132d <asn1_ex_c2i+0x17d>
mov    %rdx,(%rsp)
mov    0x2ceb(%rip),%rax
jmp    1430 <asn1_ex_c2i+0x280>
mov    %rdx,(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
call   1080 <c2i_ASN1_OBJECT@plt>
jmp    1354 <asn1_ex_c2i+0x1a4>
test   %r12d,%r12d
je     1404 <asn1_ex_c2i+0x254>
mov    %rdx,(%rsp)
mov    0x2cf4(%rip),%rax
jmp    1430 <asn1_ex_c2i+0x280>
cmp    $0x1,%r12d
jne    13ea <asn1_ex_c2i+0x23a>
mov    0x0(%rbp),%al
mov    %al,(%rbx)
mov    $0x1,%r13d
jmp    1452 <asn1_ex_c2i+0x2a2>
test   $0x1,%r12b
jne    13f7 <asn1_ex_c2i+0x247>
mov    %r13,0x8(%rsp)
mov    (%rbx),%r13
test   %r13,%r13
je     1373 <asn1_ex_c2i+0x1c3>
mov    %r15d,0x0(%r13)
jmp    1392 <asn1_ex_c2i+0x1e2>
mov    %rdx,(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
call   1070 <c2i_ASN1_BIT_STRING@plt>
mov    $0x1,%r13d
test   %eax,%eax
jne    1452 <asn1_ex_c2i+0x2a2>
jmp    1437 <asn1_ex_c2i+0x287>
xor    %edi,%edi
call   1060 <ASN1_TYPE_free@plt>
jmp    1452 <asn1_ex_c2i+0x2a2>
mov    %rdx,(%rsp)
mov    %r15d,%edi
call   10b0 <ASN1_STRING_type_new@plt>
test   %rax,%rax
je     1429 <asn1_ex_c2i+0x279>
mov    %rax,%r13
mov    %rax,(%rbx)
mov    (%rsp),%rdx
mov    0x8(%rsp),%rax
cmpb   $0x0,(%rax)
je     13b5 <asn1_ex_c2i+0x205>
mov    0x8(%r13),%rdi
mov    %rax,%rbx
call   1040 <free@plt>
mov    %rbp,0x8(%r13)
mov    %r12d,0x10(%r13)
movb   $0x0,(%rbx)
jmp    140b <asn1_ex_c2i+0x25b>
mov    %rdx,(%rsp)
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r12d,%edx
call   1090 <ASN1_STRING_set@plt>
test   %eax,%eax
jne    140b <asn1_ex_c2i+0x25b>
mov    0x2bfe(%rip),%rax
mov    (%rax),%edi
call   10d0 <ASN1error@plt>
mov    %r13,%rdi
call   1050 <ASN1_STRING_free@plt>
movq   $0x0,(%rbx)
jmp    1437 <asn1_ex_c2i+0x287>
mov    %rdx,(%rsp)
mov    0x2bc3(%rip),%rax
jmp    1430 <asn1_ex_c2i+0x280>
mov    %rdx,(%rsp)
mov    0x2bde(%rip),%rax
jmp    1430 <asn1_ex_c2i+0x280>
movq   $0x1,(%rbx)
mov    $0x1,%r13d
cmp    $0x8d,%r15d
jne    1452 <asn1_ex_c2i+0x2a2>
test   %r14,%r14
je     1452 <asn1_ex_c2i+0x2a2>
movq   $0x0,0x8(%r14)
jmp    1452 <asn1_ex_c2i+0x2a2>
mov    0x2ba0(%rip),%rax
mov    (%rax),%edi
call   10d0 <ASN1error@plt>
mov    %r14,%rdi
call   1060 <ASN1_TYPE_free@plt>
xor    %r13d,%r13d
mov    (%rsp),%rax
test   %rax,%rax
je     1452 <asn1_ex_c2i+0x2a2>
movq   $0x0,(%rax)
mov    %r13d,%eax
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*, i32* }
%struct.TYPE_21__ = type { i32 }
@V_ASN1_ANY = global i64 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
@ASN1_R_BMPSTRING_IS_WRONG_LENGTH = global i32 0
@ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH = 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 %237
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 %224
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 1
store i32** %81, i32*** %8
br label %82
82: ; preds = %77, %44
%83 = load i32, i32* %11
switch i32 %83, label %140 [
i32 139, label %84
i32 141, label %91
i32 148, label %99
i32 150, label %112
i32 142, label %119
i32 147, label %119
i32 138, label %139
i32 140, label %139
i32 136, label %139
i32 133, label %139
i32 129, label %139
i32 143, label %139
i32 131, label %139
i32 146, label %139
i32 144, label %139
i32 128, label %139
i32 145, label %139
i32 132, label %139
i32 149, label %139
i32 130, label %139
i32 137, label %139
i32 134, label %139
i32 135, label %139
]
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 %224
90: ; preds = %84
br label %213
91: ; preds = %82
%92 = load i32, i32* %10
%93 = icmp ne i32 %92, 0
br i1 %93, label %94, label %97
94: ; preds = %91
%95 = load i32, i32* @ASN1_R_NULL_IS_WRONG_LENGTH
%96 = call i32 @ASN1error(i32 %95)
br label %224
97: ; preds = %91
%98 = load i32**, i32*** %8
store i32* inttoptr (i64 1 to i32*), i32** %98
br label %213
99: ; preds = %82
%100 = load i32, i32* %10
%101 = icmp ne i32 %100, 1
br i1 %101, label %102, label %105
102: ; preds = %99
%103 = load i32, i32* @ASN1_R_BOOLEAN_IS_WRONG_LENGTH
%104 = call i32 @ASN1error(i32 %103)
br label %224
105: ; preds = %99
%106 = load i32**, i32*** %8
%107 = bitcast i32** %106 to i8*
store i8* %107, i8** %20
%108 = load i8*, i8** %9
%109 = load i8, i8* %108
%110 = load i8*, i8** %20
store i8 %109, i8* %110
br label %111
111: ; preds = %105
br label %213
112: ; preds = %82
%113 = load i32**, i32*** %8
%114 = load i32, i32* %10
%115 = call i32 @c2i_ASN1_BIT_STRING(i32** %113, i8** %9, i32 %114)
%116 = icmp ne i32 %115, 0
br i1 %116, label %118, label %117
117: ; preds = %112
br label %224
118: ; preds = %112
br label %213
119: ; preds = %82, %82
%120 = load i32**, i32*** %8
%121 = bitcast i32** %120 to %struct.TYPE_21__**
store %struct.TYPE_21__** %121, %struct.TYPE_21__*** %19
%122 = load %struct.TYPE_21__**, %struct.TYPE_21__*** %19
%123 = load i32, i32* %10
%124 = call i32 @c2i_ASN1_INTEGER(%struct.TYPE_21__** %122, i8** %9, i32 %123)
%125 = icmp ne i32 %124, 0
br i1 %125, label %127, label %126
126: ; preds = %119
br label %224
127: ; preds = %119
%128 = load i32, i32* %11
%129 = load %struct.TYPE_21__**, %struct.TYPE_21__*** %19
%130 = load %struct.TYPE_21__*, %struct.TYPE_21__** %129
%131 = getelementptr inbounds %struct.TYPE_21__, %struct.TYPE_21__* %130, i32 0, i32 0
%132 = load i32, i32* %131
%133 = load i32, i32* @V_ASN1_NEG
%134 = and i32 %132, %133
%135 = or i32 %128, %134
%136 = load %struct.TYPE_21__**, %struct.TYPE_21__*** %19
%137 = load %struct.TYPE_21__*, %struct.TYPE_21__** %136
%138 = getelementptr inbounds %struct.TYPE_21__, %struct.TYPE_21__* %137, i32 0, i32 0
store i32 %135, i32* %138
br label %213
139: ; preds = %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82, %82
br label %140
140: ; preds = %82, %139
%141 = load i32, i32* %11
%142 = icmp eq i32 %141, 149
br i1 %142, label %143, label %150
143: ; preds = %140
%144 = load i32, i32* %10
%145 = and i32 %144, 1
%146 = icmp ne i32 %145, 0
br i1 %146, label %147, label %150
147: ; preds = %143
%148 = load i32, i32* @ASN1_R_BMPSTRING_IS_WRONG_LENGTH
%149 = call i32 @ASN1error(i32 %148)
br label %224
150: ; preds = %143, %140
%151 = load i32, i32* %11
%152 = icmp eq i32 %151, 132
br i1 %152, label %153, label %160
153: ; preds = %150
%154 = load i32, i32* %10
%155 = and i32 %154, 3
%156 = icmp ne i32 %155, 0
br i1 %156, label %157, label %160
157: ; preds = %153
%158 = load i32, i32* @ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH
%159 = call i32 @ASN1error(i32 %158)
br label %224
160: ; preds = %153, %150
%161 = load i32**, i32*** %8
%162 = load i32*, i32** %161
%163 = icmp ne i32* %162, null
br i1 %163, label %176, label %164
164: ; preds = %160
%165 = load i32, i32* %11
%166 = call %struct.TYPE_18__* @ASN1_STRING_type_new(i32 %165)
store %struct.TYPE_18__* %166, %struct.TYPE_18__** %15
%167 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%168 = icmp ne %struct.TYPE_18__* %167, null
br i1 %168, label %172, label %169
169: ; preds = %164
%170 = load i32, i32* @ERR_R_MALLOC_FAILURE
%171 = call i32 @ASN1error(i32 %170)
br label %224
172: ; preds = %164
%173 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%174 = bitcast %struct.TYPE_18__* %173 to i32*
%175 = load i32**, i32*** %8
store i32* %174, i32** %175
br label %183
176: ; preds = %160
%177 = load i32**, i32*** %8
%178 = load i32*, i32** %177
%179 = bitcast i32* %178 to %struct.TYPE_18__*
store %struct.TYPE_18__* %179, %struct.TYPE_18__** %15
%180 = load i32, i32* %11
%181 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%182 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %181, i32 0, i32 0
store i32 %180, i32* %182
br label %183
183: ; preds = %176, %172
%184 = load i8*, i8** %12
%185 = load i8, i8* %184
%186 = icmp ne i8 %185, 0
br i1 %186, label %187, label %199
187: ; preds = %183
%188 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%189 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %188, i32 0, i32 1
%190 = load i8*, i8** %189
%191 = call i32 @free(i8* %190)
%192 = load i8*, i8** %9
%193 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%194 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %193, i32 0, i32 1
store i8* %192, i8** %194
%195 = load i32, i32* %10
%196 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%197 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %196, i32 0, i32 2
store i32 %195, i32* %197
%198 = load i8*, i8** %12
store i8 0, i8* %198
br label %212
199: ; preds = %183
%200 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%201 = load i8*, i8** %9
%202 = load i32, i32* %10
%203 = call i32 @ASN1_STRING_set(%struct.TYPE_18__* %200, i8* %201, i32 %202)
%204 = icmp ne i32 %203, 0
br i1 %204, label %211, label %205
205: ; preds = %199
%206 = load i32, i32* @ERR_R_MALLOC_FAILURE
%207 = call i32 @ASN1error(i32 %206)
%208 = load %struct.TYPE_18__*, %struct.TYPE_18__** %15
%209 = call i32 @ASN1_STRING_free(%struct.TYPE_18__* %208)
%210 = load i32**, i32*** %8
store i32* null, i32** %210
br label %224
211: ; preds = %199
br label %212
212: ; preds = %211, %187
br label %213
213: ; preds = %212, %127, %118, %111, %97, %90
%214 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%215 = icmp ne %struct.TYPE_17__* %214, null
br i1 %215, label %216, label %223
216: ; preds = %213
%217 = load i32, i32* %11
%218 = icmp eq i32 %217, 141
br i1 %218, label %219, label %223
219: ; preds = %216
%220 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%221 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %220, i32 0, i32 1
%222 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %221, i32 0, i32 0
store i32* null, i32** %222
br label %223
223: ; preds = %219, %216, %213
store i32 1, i32* %17
br label %224
224: ; preds = %223, %205, %169, %157, %147, %126, %117, %102, %94, %89, %58
%225 = load i32, i32* %17
%226 = icmp ne i32 %225, 0
br i1 %226, label %235, label %227
227: ; preds = %224
%228 = load %struct.TYPE_17__*, %struct.TYPE_17__** %16
%229 = call i32 @ASN1_TYPE_free(%struct.TYPE_17__* %228)
%230 = load i32**, i32*** %14
%231 = icmp ne i32** %230, null
br i1 %231, label %232, label %234
232: ; preds = %227
%233 = load i32**, i32*** %14
store i32* null, i32** %233
br label %234
234: ; preds = %232, %227
br label %235
235: ; preds = %234, %224
%236 = load i32, i32* %17
store i32 %236, i32* %7
br label %237
237: ; preds = %235, %32
%238 = load i32, i32* %7
ret i32 %238
}

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*, i32* }
%struct.TYPE_21__ = type { i32 }
%struct.TYPE_18__ = type { i32, i8*, i32 }
@V_ASN1_ANY = global i64 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
@ASN1_R_BMPSTRING_IS_WRONG_LENGTH = global i32 0
@ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH = 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 %129
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 %129
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 1
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 %90 [
i32 139, label %47
i32 141, label %50
i32 148, label %56
i32 150, label %64
i32 142, label %67
i32 147, label %67
i32 149, label %78
i32 132, label %84
]
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 %125, label %129
50: ; preds = %43
%51 = icmp eq i32 %2, 0
br i1 %51, label %55, label %52
52: ; preds = %50
%53 = load i32, i32* @ASN1_R_NULL_IS_WRONG_LENGTH
%54 = tail call i32 @ASN1error(i32 %53)
br label %125
55: ; preds = %50
store i32* inttoptr (i64 1 to i32*), i32** %46
br label %119
56: ; preds = %43
%57 = icmp eq i32 %2, 1
br i1 %57, label %61, label %58
58: ; preds = %56
%59 = load i32, i32* @ASN1_R_BOOLEAN_IS_WRONG_LENGTH
%60 = tail call i32 @ASN1error(i32 %59)
br label %125
61: ; preds = %56
%62 = bitcast i32** %46 to i8*
%63 = load i8, i8* %1
store i8 %63, i8* %62
br label %129
64: ; preds = %43
%65 = call i32 @c2i_ASN1_BIT_STRING(i32** %46, i8** %7, i32 %2)
%66 = icmp eq i32 %65, 0
br i1 %66, label %125, label %129
67: ; preds = %43, %43
%68 = bitcast i32** %46 to %struct.TYPE_21__**
%69 = call i32 @c2i_ASN1_INTEGER(%struct.TYPE_21__** %68, i8** %7, i32 %2)
%70 = icmp eq i32 %69, 0
br i1 %70, label %125, label %71
71: ; preds = %67
%72 = load %struct.TYPE_21__*, %struct.TYPE_21__** %68
%73 = getelementptr inbounds %struct.TYPE_21__, %struct.TYPE_21__* %72, i64 0, i32 0
%74 = load i32, i32* %73
%75 = load i32, i32* @V_ASN1_NEG
%76 = and i32 %75, %74
%77 = or i32 %76, %3
store i32 %77, i32* %73
br label %129
78: ; preds = %43
%79 = and i32 %2, 1
%80 = icmp eq i32 %79, 0
br i1 %80, label %90, label %81
81: ; preds = %78
%82 = load i32, i32* @ASN1_R_BMPSTRING_IS_WRONG_LENGTH
%83 = tail call i32 @ASN1error(i32 %82)
br label %125
84: ; preds = %43
%85 = and i32 %2, 3
%86 = icmp eq i32 %85, 0
br i1 %86, label %90, label %87
87: ; preds = %84
%88 = load i32, i32* @ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH
%89 = tail call i32 @ASN1error(i32 %88)
br label %125
90: ; preds = %78, %43, %84
%91 = load i32*, i32** %46
%92 = icmp eq i32* %91, null
br i1 %92, label %93, label %101
93: ; preds = %90
%94 = tail call %struct.TYPE_18__* @ASN1_STRING_type_new(i32 %3)
%95 = icmp eq %struct.TYPE_18__* %94, null
br i1 %95, label %96, label %99
96: ; preds = %93
%97 = load i32, i32* @ERR_R_MALLOC_FAILURE
%98 = tail call i32 @ASN1error(i32 %97)
br label %125
99: ; preds = %93
%100 = getelementptr %struct.TYPE_18__, %struct.TYPE_18__* %94, i64 0, i32 0
store i32* %100, i32** %46
br label %103
101: ; preds = %90
%102 = bitcast i32* %91 to %struct.TYPE_18__*
store i32 %3, i32* %91
br label %103
103: ; preds = %101, %99
%104 = phi %struct.TYPE_18__* [ %102, %101 ], [ %94, %99 ]
%105 = load i8, i8* %4
%106 = icmp eq i8 %105, 0
br i1 %106, label %112, label %107
107: ; preds = %103
%108 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %104, i64 0, i32 1
%109 = load i8*, i8** %108
%110 = tail call i32 @free(i8* %109)
store i8* %1, i8** %108
%111 = getelementptr inbounds %struct.TYPE_18__, %struct.TYPE_18__* %104, i64 0, i32 2
store i32 %2, i32* %111
store i8 0, i8* %4
br label %119
112: ; preds = %103
%113 = tail call i32 @ASN1_STRING_set(%struct.TYPE_18__* %104, i8* %1, i32 %2)
%114 = icmp eq i32 %113, 0
br i1 %114, label %115, label %119
115: ; preds = %112
%116 = load i32, i32* @ERR_R_MALLOC_FAILURE
%117 = tail call i32 @ASN1error(i32 %116)
%118 = tail call i32 @ASN1_STRING_free(%struct.TYPE_18__* %104)
store i32* null, i32** %46
br label %125
119: ; preds = %107, %112, %55
%120 = icmp ne %struct.TYPE_17__* %44, null
%121 = icmp eq i32 %3, 141
%122 = and i1 %121, %120
br i1 %122, label %123, label %129
123: ; preds = %119
%124 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %44, i64 0, i32 1, i32 0
store i32* null, i32** %124
br label %129
125: ; preds = %81, %87, %115, %96, %67, %64, %58, %52, %47
%126 = call i32 @ASN1_TYPE_free(%struct.TYPE_17__* %44)
%127 = icmp eq i32** %45, null
br i1 %127, label %129, label %128
128: ; preds = %125
store i32* null, i32** %45
br label %129
129: ; preds = %61, %71, %47, %64, %28, %123, %119, %128, %125, %15
%130 = phi i32 [ %16, %15 ], [ 0, %125 ], [ 0, %128 ], [ 1, %123 ], [ 1, %119 ], [ 0, %28 ], [ 1, %64 ], [ 1, %47 ], [ 1, %71 ], [ 1, %61 ]
ret i32 %130
}