#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */
typedef struct TYPE_6__ TYPE_1__;

/* Type definitions */
struct TYPE_6__ {
  int flags;
  int length;
  unsigned char *data;
  int /*<<< orphan*/ type;
};
typedef TYPE_1__ ASN1_BIT_STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_F_C2I_ASN1_BIT_STRING;
int ASN1_R_STRING_TOO_SHORT;
int ASN1_STRING_FLAG_BITS_LEFT;
int /*<<< orphan*/ ASN1err(int /*<<< orphan*/, int);
int ERR_R_MALLOC_FAILURE;
int /*<<< orphan*/ M_ASN1_BIT_STRING_free(TYPE_1__ *);
TYPE_1__ *M_ASN1_BIT_STRING_new();
int /*<<< orphan*/ V_ASN1_BIT_STRING;
int /*<<< orphan*/ free(unsigned char *);
unsigned char *malloc(int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, long);
ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
                                     const unsigned char **pp, long len) {
  ASN1_BIT_STRING *ret = NULL;
  const unsigned char *p;
  unsigned char *s;
  int i;
  if (len < 1) {
    i = ASN1_R_STRING_TOO_SHORT;
    goto err;
  }
  if ((a == NULL) || ((*a) == NULL)) {
    if ((ret = M_ASN1_BIT_STRING_new()) == NULL)
      return (NULL);
  } else
    ret = (*a);
  p = *pp;
  i = *(p++);
  ret->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07);
  ret->flags |= (ASN1_STRING_FLAG_BITS_LEFT | (i & 0x07));
  if (len-- > 1) {
    s = malloc((int)len);
    if (s == NULL) {
      i = ERR_R_MALLOC_FAILURE;
      goto err;
    }
    memcpy(s, p, len);
    s[len - 1] &= (0xff << i);
    p += len;
  } else
    s = NULL;
  ret->length = (int)len;
  free(ret->data);
  ret->data = s;
  ret->type = V_ASN1_BIT_STRING;
  if (a != NULL)
    (*a) = ret;
  *pp = p;
  return (ret);
err:
  ASN1err(ASN1_F_C2I_ASN1_BIT_STRING, i);
  if ((ret != NULL) && ((a == NULL) || (*a != ret)))
    M_ASN1_BIT_STRING_free(ret);
  return (NULL);
}


x86 assembly (clang, -O0):
<c2i_ASN1_BIT_STRING>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x1,-0x20(%rbp)
jge    1198 <c2i_ASN1_BIT_STRING+0x38>
mov    0x2e42(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
jmp    1324 <c2i_ASN1_BIT_STRING+0x1c4>
cmpq   $0x0,-0x10(%rbp)
je     11b1 <c2i_ASN1_BIT_STRING+0x51>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    11d8 <c2i_ASN1_BIT_STRING+0x78>
mov    $0x0,%al
call   1080 <M_ASN1_BIT_STRING_new@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    11d3 <c2i_ASN1_BIT_STRING+0x73>
movq   $0x0,-0x8(%rbp)
jmp    136d <c2i_ASN1_BIT_STRING+0x20d>
jmp    11e3 <c2i_ASN1_BIT_STRING+0x83>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    0x2dde(%rip),%rax
mov    (%rax),%ecx
or     $0x7,%ecx
xor    $0xffffffff,%ecx
mov    -0x28(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    0x2dc7(%rip),%rax
mov    (%rax),%ecx
mov    -0x3c(%rbp),%eax
and    $0x7,%eax
or     %eax,%ecx
mov    -0x28(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x1,%rax
jle    12b8 <c2i_ASN1_BIT_STRING+0x158>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1277 <c2i_ASN1_BIT_STRING+0x117>
mov    0x2d5b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
jmp    1324 <c2i_ASN1_BIT_STRING+0x1c4>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1060 <memcpy@plt>
mov    -0x3c(%rbp),%ecx
mov    $0xff,%esi
shl    %cl,%esi
mov    -0x38(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    $0x1,%rcx
movzbl (%rax,%rcx,1),%edx
and    %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    12c0 <c2i_ASN1_BIT_STRING+0x160>
movq   $0x0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    0x2d0b(%rip),%rax
mov    (%rax),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,0x10(%rax)
cmpq   $0x0,-0x10(%rbp)
je     130c <c2i_ASN1_BIT_STRING+0x1ac>
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    136d <c2i_ASN1_BIT_STRING+0x20d>
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%esi
call   1050 <ASN1err@plt>
cmpq   $0x0,-0x28(%rbp)
je     1365 <c2i_ASN1_BIT_STRING+0x205>
cmpq   $0x0,-0x10(%rbp)
je     135c <c2i_ASN1_BIT_STRING+0x1fc>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x28(%rbp),%rax
je     1365 <c2i_ASN1_BIT_STRING+0x205>
mov    -0x28(%rbp),%rdi
call   1040 <M_ASN1_BIT_STRING_free@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c2i_ASN1_BIT_STRING>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%r14
test   %rdx,%rdx
jle    1217 <c2i_ASN1_BIT_STRING+0xb7>
mov    %rdx,%r12
mov    %rsi,%rbp
test   %r14,%r14
je     118d <c2i_ASN1_BIT_STRING+0x2d>
mov    (%r14),%rbx
test   %rbx,%rbx
jne    11a0 <c2i_ASN1_BIT_STRING+0x40>
xor    %eax,%eax
call   1080 <M_ASN1_BIT_STRING_new@plt>
mov    %rax,%rbx
test   %rax,%rax
je     128a <c2i_ASN1_BIT_STRING+0x12a>
mov    %rbp,0x10(%rsp)
mov    0x0(%rbp),%rbp
lea    0x1(%rbp),%rax
mov    %rax,0x8(%rsp)
movzbl 0x0(%rbp),%esi
mov    0x2e2b(%rip),%rax
mov    (%rax),%ecx
not    %ecx
and    (%rbx),%ecx
and    $0xfffffff8,%ecx
mov    %ecx,(%rbx)
mov    %esi,%edx
and    $0x7,%edx
or     %ecx,%edx
or     (%rax),%edx
mov    %edx,(%rbx)
cmp    $0x2,%r12
jb     1222 <c2i_ASN1_BIT_STRING+0xc2>
mov    %esi,0x4(%rsp)
lea    -0x1(%r12),%r13
mov    %r13d,%edi
call   1070 <malloc@plt>
test   %rax,%rax
je     125c <c2i_ASN1_BIT_STRING+0xfc>
mov    %rax,%r15
mov    %rax,%rdi
mov    0x8(%rsp),%rsi
mov    %r13,%rdx
call   1060 <memcpy@plt>
mov    $0xff,%eax
mov    0x4(%rsp),%ecx
shl    %cl,%eax
and    %al,-0x2(%r12,%r15,1)
add    %r12,%rbp
jmp    122d <c2i_ASN1_BIT_STRING+0xcd>
mov    0x2db2(%rip),%rax
xor    %ebx,%ebx
jmp    1263 <c2i_ASN1_BIT_STRING+0x103>
xor    %r13d,%r13d
xor    %r15d,%r15d
mov    0x8(%rsp),%rbp
mov    %r13d,0x4(%rbx)
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
mov    %r15,0x8(%rbx)
mov    0x2db3(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rbx)
test   %r14,%r14
je     1252 <c2i_ASN1_BIT_STRING+0xf2>
mov    %rbx,(%r14)
mov    0x10(%rsp),%rax
mov    %rbp,(%rax)
jmp    128c <c2i_ASN1_BIT_STRING+0x12c>
mov    0x2d65(%rip),%rax
mov    (%rax),%esi
mov    0x2d74(%rip),%rax
mov    (%rax),%edi
call   1050 <ASN1err@plt>
test   %rbx,%rbx
je     128a <c2i_ASN1_BIT_STRING+0x12a>
test   %r14,%r14
je     1282 <c2i_ASN1_BIT_STRING+0x122>
cmp    %rbx,(%r14)
je     128a <c2i_ASN1_BIT_STRING+0x12a>
mov    %rbx,%rdi
call   1040 <M_ASN1_BIT_STRING_free@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_6__ = type { i32, i32, i8*, i32 }
@ASN1_R_STRING_TOO_SHORT = global i32 0
@ASN1_STRING_FLAG_BITS_LEFT = global i32 0
@ERR_R_MALLOC_FAILURE = global i32 0
@V_ASN1_BIT_STRING = global i32 0
@ASN1_F_C2I_ASN1_BIT_STRING = global i32 0
define %struct.TYPE_6__* @c2i_ASN1_BIT_STRING(%struct.TYPE_6__** %0, i8** %1, i64 %2) {
%4 = alloca %struct.TYPE_6__*
%5 = alloca %struct.TYPE_6__**
%6 = alloca i8**
%7 = alloca i64
%8 = alloca %struct.TYPE_6__*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
store %struct.TYPE_6__** %0, %struct.TYPE_6__*** %5
store i8** %1, i8*** %6
store i64 %2, i64* %7
store %struct.TYPE_6__* null, %struct.TYPE_6__** %8
%12 = load i64, i64* %7
%13 = icmp slt i64 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = load i32, i32* @ASN1_R_STRING_TOO_SHORT
store i32 %15, i32* %11
br label %107
16: ; preds = %3
%17 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
%18 = icmp eq %struct.TYPE_6__** %17, null
br i1 %18, label %23, label %19
19: ; preds = %16
%20 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
%21 = load %struct.TYPE_6__*, %struct.TYPE_6__** %20
%22 = icmp eq %struct.TYPE_6__* %21, null
br i1 %22, label %23, label %28
23: ; preds = %19, %16
%24 = call %struct.TYPE_6__* (...) @M_ASN1_BIT_STRING_new()
store %struct.TYPE_6__* %24, %struct.TYPE_6__** %8
%25 = icmp eq %struct.TYPE_6__* %24, null
br i1 %25, label %26, label %27
26: ; preds = %23
store %struct.TYPE_6__* null, %struct.TYPE_6__** %4
br label %125
27: ; preds = %23
br label %31
28: ; preds = %19
%29 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
%30 = load %struct.TYPE_6__*, %struct.TYPE_6__** %29
store %struct.TYPE_6__* %30, %struct.TYPE_6__** %8
br label %31
31: ; preds = %28, %27
%32 = load i8**, i8*** %6
%33 = load i8*, i8** %32
store i8* %33, i8** %9
%34 = load i8*, i8** %9
%35 = getelementptr inbounds i8, i8* %34, i32 1
store i8* %35, i8** %9
%36 = load i8, i8* %34
%37 = zext i8 %36 to i32
store i32 %37, i32* %11
%38 = load i32, i32* @ASN1_STRING_FLAG_BITS_LEFT
%39 = or i32 %38, 7
%40 = xor i32 %39, -1
%41 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%42 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %41, i32 0, i32 0
%43 = load i32, i32* %42
%44 = and i32 %43, %40
store i32 %44, i32* %42
%45 = load i32, i32* @ASN1_STRING_FLAG_BITS_LEFT
%46 = load i32, i32* %11
%47 = and i32 %46, 7
%48 = or i32 %45, %47
%49 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%50 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %49, i32 0, i32 0
%51 = load i32, i32* %50
%52 = or i32 %51, %48
store i32 %52, i32* %50
%53 = load i64, i64* %7
%54 = add nsw i64 %53, -1
store i64 %54, i64* %7
%55 = icmp sgt i64 %53, 1
br i1 %55, label %56, label %82
56: ; preds = %31
%57 = load i64, i64* %7
%58 = trunc i64 %57 to i32
%59 = call i8* @malloc(i32 %58)
store i8* %59, i8** %10
%60 = load i8*, i8** %10
%61 = icmp eq i8* %60, null
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = load i32, i32* @ERR_R_MALLOC_FAILURE
store i32 %63, i32* %11
br label %107
64: ; preds = %56
%65 = load i8*, i8** %10
%66 = load i8*, i8** %9
%67 = load i64, i64* %7
%68 = call i32 @memcpy(i8* %65, i8* %66, i64 %67)
%69 = load i32, i32* %11
%70 = shl i32 255, %69
%71 = load i8*, i8** %10
%72 = load i64, i64* %7
%73 = sub nsw i64 %72, 1
%74 = getelementptr inbounds i8, i8* %71, i64 %73
%75 = load i8, i8* %74
%76 = zext i8 %75 to i32
%77 = and i32 %76, %70
%78 = trunc i32 %77 to i8
store i8 %78, i8* %74
%79 = load i64, i64* %7
%80 = load i8*, i8** %9
%81 = getelementptr inbounds i8, i8* %80, i64 %79
store i8* %81, i8** %9
br label %83
82: ; preds = %31
store i8* null, i8** %10
br label %83
83: ; preds = %82, %64
%84 = load i64, i64* %7
%85 = trunc i64 %84 to i32
%86 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%87 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %86, i32 0, i32 1
store i32 %85, i32* %87
%88 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%89 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %88, i32 0, i32 2
%90 = load i8*, i8** %89
%91 = call i32 @free(i8* %90)
%92 = load i8*, i8** %10
%93 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%94 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %93, i32 0, i32 2
store i8* %92, i8** %94
%95 = load i32, i32* @V_ASN1_BIT_STRING
%96 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%97 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %96, i32 0, i32 3
store i32 %95, i32* %97
%98 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
%99 = icmp ne %struct.TYPE_6__** %98, null
br i1 %99, label %100, label %103
100: ; preds = %83
%101 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%102 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
store %struct.TYPE_6__* %101, %struct.TYPE_6__** %102
br label %103
103: ; preds = %100, %83
%104 = load i8*, i8** %9
%105 = load i8**, i8*** %6
store i8* %104, i8** %105
%106 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
store %struct.TYPE_6__* %106, %struct.TYPE_6__** %4
br label %125
107: ; preds = %62, %14
%108 = load i32, i32* @ASN1_F_C2I_ASN1_BIT_STRING
%109 = load i32, i32* %11
%110 = call i32 @ASN1err(i32 %108, i32 %109)
%111 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%112 = icmp ne %struct.TYPE_6__* %111, null
br i1 %112, label %113, label %124
113: ; preds = %107
%114 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
%115 = icmp eq %struct.TYPE_6__** %114, null
br i1 %115, label %121, label %116
116: ; preds = %113
%117 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
%118 = load %struct.TYPE_6__*, %struct.TYPE_6__** %117
%119 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%120 = icmp ne %struct.TYPE_6__* %118, %119
br i1 %120, label %121, label %124
121: ; preds = %116, %113
%122 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%123 = call i32 @M_ASN1_BIT_STRING_free(%struct.TYPE_6__* %122)
br label %124
124: ; preds = %121, %116, %107
store %struct.TYPE_6__* null, %struct.TYPE_6__** %4
br label %125
125: ; preds = %124, %103, %26
%126 = load %struct.TYPE_6__*, %struct.TYPE_6__** %4
ret %struct.TYPE_6__* %126
}

LLVM IR (-O2):
%struct.TYPE_6__ = type { i32, i32, i8*, i32 }
@ASN1_R_STRING_TOO_SHORT = global i32 0
@ASN1_STRING_FLAG_BITS_LEFT = global i32 0
@ERR_R_MALLOC_FAILURE = global i32 0
@V_ASN1_BIT_STRING = global i32 0
@ASN1_F_C2I_ASN1_BIT_STRING = global i32 0
define %struct.TYPE_6__* @c2i_ASN1_BIT_STRING(%struct.TYPE_6__** %0, i8** nocapture %1, i64 %2) {
%4 = icmp slt i64 %2, 1
br i1 %4, label %56, label %5
5: ; preds = %3
%6 = icmp eq %struct.TYPE_6__** %0, null
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = load %struct.TYPE_6__*, %struct.TYPE_6__** %0
%9 = icmp eq %struct.TYPE_6__* %8, null
br i1 %9, label %10, label %13
10: ; preds = %7, %5
%11 = tail call %struct.TYPE_6__* (...) @M_ASN1_BIT_STRING_new()
%12 = icmp eq %struct.TYPE_6__* %11, null
br i1 %12, label %70, label %13
13: ; preds = %7, %10
%14 = phi %struct.TYPE_6__* [ %11, %10 ], [ %8, %7 ]
%15 = load i8*, i8** %1
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %15
%18 = zext i8 %17 to i32
%19 = load i32, i32* @ASN1_STRING_FLAG_BITS_LEFT
%20 = or i32 %19, 7
%21 = xor i32 %20, -1
%22 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 0
%23 = load i32, i32* %22
%24 = and i32 %23, %21
store i32 %24, i32* %22
%25 = load i32, i32* @ASN1_STRING_FLAG_BITS_LEFT
%26 = and i32 %18, 7
%27 = or i32 %24, %26
%28 = or i32 %27, %25
store i32 %28, i32* %22
%29 = add nsw i64 %2, -1
%30 = icmp ugt i64 %2, 1
br i1 %30, label %31, label %44
31: ; preds = %13
%32 = trunc i64 %29 to i32
%33 = tail call i8* @malloc(i32 %32)
%34 = icmp eq i8* %33, null
br i1 %34, label %56, label %35
35: ; preds = %31
%36 = tail call i32 @memcpy(i8* %33, i8* %16, i64 %29)
%37 = shl i32 255, %18
%38 = add nsw i64 %2, -2
%39 = getelementptr inbounds i8, i8* %33, i64 %38
%40 = load i8, i8* %39
%41 = trunc i32 %37 to i8
%42 = and i8 %40, %41
store i8 %42, i8* %39
%43 = getelementptr inbounds i8, i8* %15, i64 %2
br label %44
44: ; preds = %13, %35
%45 = phi i32 [ %32, %35 ], [ 0, %13 ]
%46 = phi i8* [ %43, %35 ], [ %16, %13 ]
%47 = phi i8* [ %33, %35 ], [ null, %13 ]
%48 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 1
store i32 %45, i32* %48
%49 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 2
%50 = load i8*, i8** %49
%51 = tail call i32 @free(i8* %50)
store i8* %47, i8** %49
%52 = load i32, i32* @V_ASN1_BIT_STRING
%53 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 3
store i32 %52, i32* %53
br i1 %6, label %55, label %54
54: ; preds = %44
store %struct.TYPE_6__* %14, %struct.TYPE_6__** %0
br label %55
55: ; preds = %54, %44
store i8* %46, i8** %1
br label %70
56: ; preds = %31, %3
%57 = phi %struct.TYPE_6__* [ null, %3 ], [ %14, %31 ]
%58 = phi i32* [ @ASN1_R_STRING_TOO_SHORT, %3 ], [ @ERR_R_MALLOC_FAILURE, %31 ]
%59 = load i32, i32* %58
%60 = load i32, i32* @ASN1_F_C2I_ASN1_BIT_STRING
%61 = tail call i32 @ASN1err(i32 %60, i32 %59)
%62 = icmp eq %struct.TYPE_6__* %57, null
br i1 %62, label %70, label %63
63: ; preds = %56
%64 = icmp eq %struct.TYPE_6__** %0, null
br i1 %64, label %68, label %65
65: ; preds = %63
%66 = load %struct.TYPE_6__*, %struct.TYPE_6__** %0
%67 = icmp eq %struct.TYPE_6__* %66, %57
br i1 %67, label %70, label %68
68: ; preds = %65, %63
%69 = tail call i32 @M_ASN1_BIT_STRING_free(%struct.TYPE_6__* %57)
br label %70
70: ; preds = %56, %65, %68, %10, %55
%71 = phi %struct.TYPE_6__* [ %14, %55 ], [ null, %10 ], [ null, %68 ], [ null, %65 ], [ null, %56 ]
ret %struct.TYPE_6__* %71
}