#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_BIT_STRING_free(TYPE_1__ *);
TYPE_1__ *ASN1_BIT_STRING_new();
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*/ V_ASN1_BIT_STRING;
int /*<<< orphan*/ free(unsigned char *);
unsigned char *malloc(long);
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 = 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(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)))
    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    1322 <c2i_ASN1_BIT_STRING+0x1c2>
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   1050 <ASN1_BIT_STRING_new@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    11d3 <c2i_ASN1_BIT_STRING+0x73>
movq   $0x0,-0x8(%rbp)
jmp    136b <c2i_ASN1_BIT_STRING+0x20b>
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    12b6 <c2i_ASN1_BIT_STRING+0x156>
mov    -0x20(%rbp),%rdi
call   1080 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1275 <c2i_ASN1_BIT_STRING+0x115>
mov    0x2d5d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
jmp    1322 <c2i_ASN1_BIT_STRING+0x1c2>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1070 <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    12be <c2i_ASN1_BIT_STRING+0x15e>
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    0x2d0d(%rip),%rax
mov    (%rax),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,0x10(%rax)
cmpq   $0x0,-0x10(%rbp)
je     130a <c2i_ASN1_BIT_STRING+0x1aa>
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    136b <c2i_ASN1_BIT_STRING+0x20b>
mov    0x2cb7(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%esi
call   1040 <ASN1err@plt>
cmpq   $0x0,-0x28(%rbp)
je     1363 <c2i_ASN1_BIT_STRING+0x203>
cmpq   $0x0,-0x10(%rbp)
je     135a <c2i_ASN1_BIT_STRING+0x1fa>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x28(%rbp),%rax
je     1363 <c2i_ASN1_BIT_STRING+0x203>
mov    -0x28(%rbp),%rdi
call   1060 <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   1050 <ASN1_BIT_STRING_new@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1286 <c2i_ASN1_BIT_STRING+0x126>
mov    %rbp,0x10(%rsp)
mov    0x0(%rbp),%r15
movzbl (%r15),%esi
mov    0x2e34(%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
lea    0x1(%r15),%rax
mov    %rax,0x8(%rsp)
mov    %edx,(%rbx)
lea    -0x1(%r12),%rbp
cmp    $0x2,%r12
jb     1222 <c2i_ASN1_BIT_STRING+0xc2>
mov    %esi,0x4(%rsp)
mov    %rbp,%rdi
call   1080 <malloc@plt>
test   %rax,%rax
je     1258 <c2i_ASN1_BIT_STRING+0xf8>
mov    %rax,%r13
mov    %rax,%rdi
mov    0x8(%rsp),%rsi
mov    %rbp,%rdx
call   1070 <memcpy@plt>
mov    $0xff,%eax
mov    0x4(%rsp),%ecx
shl    %cl,%eax
and    %al,-0x2(%r12,%r13,1)
add    %r12,%r15
jmp    122a <c2i_ASN1_BIT_STRING+0xca>
mov    0x2db2(%rip),%rax
xor    %ebx,%ebx
jmp    125f <c2i_ASN1_BIT_STRING+0xff>
xor    %r13d,%r13d
mov    0x8(%rsp),%r15
mov    %ebp,0x4(%rbx)
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
mov    %r13,0x8(%rbx)
mov    0x2db7(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rbx)
test   %r14,%r14
mov    0x10(%rsp),%rax
je     1253 <c2i_ASN1_BIT_STRING+0xf3>
mov    %rbx,(%r14)
mov    %r15,(%rax)
jmp    1288 <c2i_ASN1_BIT_STRING+0x128>
mov    0x2d69(%rip),%rax
mov    (%rax),%esi
mov    0x2d78(%rip),%rax
mov    (%rax),%edi
call   1040 <ASN1err@plt>
test   %rbx,%rbx
je     1286 <c2i_ASN1_BIT_STRING+0x126>
test   %r14,%r14
je     127e <c2i_ASN1_BIT_STRING+0x11e>
cmp    %rbx,(%r14)
je     1286 <c2i_ASN1_BIT_STRING+0x126>
mov    %rbx,%rdi
call   1060 <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 %106
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__* (...) @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 %124
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 %81
56: ; preds = %31
%57 = load i64, i64* %7
%58 = call i8* @malloc(i64 %57)
store i8* %58, i8** %10
%59 = load i8*, i8** %10
%60 = icmp eq i8* %59, null
br i1 %60, label %61, label %63
61: ; preds = %56
%62 = load i32, i32* @ERR_R_MALLOC_FAILURE
store i32 %62, i32* %11
br label %106
63: ; preds = %56
%64 = load i8*, i8** %10
%65 = load i8*, i8** %9
%66 = load i64, i64* %7
%67 = call i32 @memcpy(i8* %64, i8* %65, i64 %66)
%68 = load i32, i32* %11
%69 = shl i32 255, %68
%70 = load i8*, i8** %10
%71 = load i64, i64* %7
%72 = sub nsw i64 %71, 1
%73 = getelementptr inbounds i8, i8* %70, i64 %72
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = and i32 %75, %69
%77 = trunc i32 %76 to i8
store i8 %77, i8* %73
%78 = load i64, i64* %7
%79 = load i8*, i8** %9
%80 = getelementptr inbounds i8, i8* %79, i64 %78
store i8* %80, i8** %9
br label %82
81: ; preds = %31
store i8* null, i8** %10
br label %82
82: ; preds = %81, %63
%83 = load i64, i64* %7
%84 = trunc i64 %83 to i32
%85 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%86 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %85, i32 0, i32 1
store i32 %84, i32* %86
%87 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%88 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %87, i32 0, i32 2
%89 = load i8*, i8** %88
%90 = call i32 @free(i8* %89)
%91 = load i8*, i8** %10
%92 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%93 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %92, i32 0, i32 2
store i8* %91, i8** %93
%94 = load i32, i32* @V_ASN1_BIT_STRING
%95 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%96 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %95, i32 0, i32 3
store i32 %94, i32* %96
%97 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
%98 = icmp ne %struct.TYPE_6__** %97, null
br i1 %98, label %99, label %102
99: ; preds = %82
%100 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%101 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
store %struct.TYPE_6__* %100, %struct.TYPE_6__** %101
br label %102
102: ; preds = %99, %82
%103 = load i8*, i8** %9
%104 = load i8**, i8*** %6
store i8* %103, i8** %104
%105 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
store %struct.TYPE_6__* %105, %struct.TYPE_6__** %4
br label %124
106: ; preds = %61, %14
%107 = load i32, i32* @ASN1_F_C2I_ASN1_BIT_STRING
%108 = load i32, i32* %11
%109 = call i32 @ASN1err(i32 %107, i32 %108)
%110 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%111 = icmp ne %struct.TYPE_6__* %110, null
br i1 %111, label %112, label %123
112: ; preds = %106
%113 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
%114 = icmp eq %struct.TYPE_6__** %113, null
br i1 %114, label %120, label %115
115: ; preds = %112
%116 = load %struct.TYPE_6__**, %struct.TYPE_6__*** %5
%117 = load %struct.TYPE_6__*, %struct.TYPE_6__** %116
%118 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%119 = icmp ne %struct.TYPE_6__* %117, %118
br i1 %119, label %120, label %123
120: ; preds = %115, %112
%121 = load %struct.TYPE_6__*, %struct.TYPE_6__** %8
%122 = call i32 @ASN1_BIT_STRING_free(%struct.TYPE_6__* %121)
br label %123
123: ; preds = %120, %115, %106
store %struct.TYPE_6__* null, %struct.TYPE_6__** %4
br label %124
124: ; preds = %123, %102, %26
%125 = load %struct.TYPE_6__*, %struct.TYPE_6__** %4
ret %struct.TYPE_6__* %125
}

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 %55, 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__* (...) @ASN1_BIT_STRING_new()
%12 = icmp eq %struct.TYPE_6__* %11, null
br i1 %12, label %69, 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 %43
31: ; preds = %13
%32 = tail call i8* @malloc(i64 %29)
%33 = icmp eq i8* %32, null
br i1 %33, label %55, label %34
34: ; preds = %31
%35 = tail call i32 @memcpy(i8* %32, i8* %16, i64 %29)
%36 = shl i32 255, %18
%37 = add nsw i64 %2, -2
%38 = getelementptr inbounds i8, i8* %32, i64 %37
%39 = load i8, i8* %38
%40 = trunc i32 %36 to i8
%41 = and i8 %39, %40
store i8 %41, i8* %38
%42 = getelementptr inbounds i8, i8* %15, i64 %2
br label %43
43: ; preds = %13, %34
%44 = phi i8* [ %42, %34 ], [ %16, %13 ]
%45 = phi i8* [ %32, %34 ], [ null, %13 ]
%46 = trunc i64 %29 to i32
%47 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 1
store i32 %46, i32* %47
%48 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 2
%49 = load i8*, i8** %48
%50 = tail call i32 @free(i8* %49)
store i8* %45, i8** %48
%51 = load i32, i32* @V_ASN1_BIT_STRING
%52 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 3
store i32 %51, i32* %52
br i1 %6, label %54, label %53
53: ; preds = %43
store %struct.TYPE_6__* %14, %struct.TYPE_6__** %0
br label %54
54: ; preds = %53, %43
store i8* %44, i8** %1
br label %69
55: ; preds = %31, %3
%56 = phi %struct.TYPE_6__* [ null, %3 ], [ %14, %31 ]
%57 = phi i32* [ @ASN1_R_STRING_TOO_SHORT, %3 ], [ @ERR_R_MALLOC_FAILURE, %31 ]
%58 = load i32, i32* %57
%59 = load i32, i32* @ASN1_F_C2I_ASN1_BIT_STRING
%60 = tail call i32 @ASN1err(i32 %59, i32 %58)
%61 = icmp eq %struct.TYPE_6__* %56, null
br i1 %61, label %69, label %62
62: ; preds = %55
%63 = icmp eq %struct.TYPE_6__** %0, null
br i1 %63, label %67, label %64
64: ; preds = %62
%65 = load %struct.TYPE_6__*, %struct.TYPE_6__** %0
%66 = icmp eq %struct.TYPE_6__* %65, %56
br i1 %66, label %69, label %67
67: ; preds = %64, %62
%68 = tail call i32 @ASN1_BIT_STRING_free(%struct.TYPE_6__* %56)
br label %69
69: ; preds = %55, %64, %67, %10, %54
%70 = phi %struct.TYPE_6__* [ %14, %54 ], [ null, %10 ], [ null, %67 ], [ null, %64 ], [ null, %55 ]
ret %struct.TYPE_6__* %70
}