#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;
  unsigned char *data;
  int length;
  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_R_INVALID_BIT_STRING_BITS_LEFT;
int /*<<< orphan*/ ASN1_R_STRING_TOO_SHORT;
int ASN1_STRING_FLAG_BITS_LEFT;
int /*<<< orphan*/ ASN1error(int /*<<< orphan*/);
int /*<<< orphan*/ 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) {
    ASN1error(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++);
  if (i > 7) {
    ASN1error(ASN1_R_INVALID_BIT_STRING_BITS_LEFT);
    goto err;
  }
  ret->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07);
  ret->flags |= (ASN1_STRING_FLAG_BITS_LEFT | i);
  if (len-- > 1) {
    if ((s = malloc(len)) == NULL) {
      ASN1error(ERR_R_MALLOC_FAILURE);
      goto err;
    }
    memcpy(s, p, len);
    s[len - 1] &= (0xff << i);
    p += len;
  } else
    s = NULL;
  free(ret->data);
  ret->data = s;
  ret->length = (int)len;
  ret->type = V_ASN1_BIT_STRING;
  if (a != NULL)
    *a = ret;
  *pp = p;
  return (ret);
err:
  if (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    119a <c2i_ASN1_BIT_STRING+0x3a>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
call   1080 <ASN1error@plt>
jmp    133d <c2i_ASN1_BIT_STRING+0x1dd>
cmpq   $0x0,-0x10(%rbp)
je     11b3 <c2i_ASN1_BIT_STRING+0x53>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    11da <c2i_ASN1_BIT_STRING+0x7a>
mov    $0x0,%al
call   1040 <ASN1_BIT_STRING_new@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    11d5 <c2i_ASN1_BIT_STRING+0x75>
movq   $0x0,-0x8(%rbp)
jmp    136a <c2i_ASN1_BIT_STRING+0x20a>
jmp    11e5 <c2i_ASN1_BIT_STRING+0x85>
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)
cmpl   $0x7,-0x3c(%rbp)
jle    1222 <c2i_ASN1_BIT_STRING+0xc2>
mov    0x2daa(%rip),%rax
mov    (%rax),%edi
call   1080 <ASN1error@plt>
jmp    133d <c2i_ASN1_BIT_STRING+0x1dd>
mov    0x2dbf(%rip),%rax
mov    (%rax),%ecx
or     $0x7,%ecx
xor    $0xffffffff,%ecx
mov    -0x28(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    0x2da8(%rip),%rax
mov    (%rax),%ecx
or     -0x3c(%rbp),%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    12d1 <c2i_ASN1_BIT_STRING+0x171>
mov    -0x20(%rbp),%rdi
call   1070 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1290 <c2i_ASN1_BIT_STRING+0x130>
mov    0x2d4c(%rip),%rax
mov    (%rax),%edi
call   1080 <ASN1error@plt>
jmp    133d <c2i_ASN1_BIT_STRING+0x1dd>
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    12d9 <c2i_ASN1_BIT_STRING+0x179>
movq   $0x0,-0x38(%rbp)
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    -0x20(%rbp),%rax
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    0x2cf2(%rip),%rax
mov    (%rax),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,0x14(%rax)
cmpq   $0x0,-0x10(%rbp)
je     1325 <c2i_ASN1_BIT_STRING+0x1c5>
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    136a <c2i_ASN1_BIT_STRING+0x20a>
cmpq   $0x0,-0x10(%rbp)
je     1359 <c2i_ASN1_BIT_STRING+0x1f9>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x28(%rbp),%rax
je     1362 <c2i_ASN1_BIT_STRING+0x202>
mov    -0x28(%rbp),%rdi
call   1050 <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    11ae <c2i_ASN1_BIT_STRING+0x4e>
mov    %rdx,%r12
mov    %rsi,%r15
test   %r14,%r14
je     1189 <c2i_ASN1_BIT_STRING+0x29>
mov    (%r14),%rbx
test   %rbx,%rbx
jne    1198 <c2i_ASN1_BIT_STRING+0x38>
xor    %eax,%eax
call   1040 <ASN1_BIT_STRING_new@plt>
mov    %rax,%rbx
test   %rax,%rax
je     11d0 <c2i_ASN1_BIT_STRING+0x70>
mov    (%r15),%r13
movzbl 0x0(%r13),%ebp
cmp    $0x7,%ebp
jbe    11e4 <c2i_ASN1_BIT_STRING+0x84>
mov    0x2e14(%rip),%rax
jmp    11b7 <c2i_ASN1_BIT_STRING+0x57>
mov    0x2e23(%rip),%rax
xor    %ebx,%ebx
mov    (%rax),%edi
call   1080 <ASN1error@plt>
test   %r14,%r14
je     11c8 <c2i_ASN1_BIT_STRING+0x68>
cmp    %rbx,(%r14)
je     11d0 <c2i_ASN1_BIT_STRING+0x70>
mov    %rbx,%rdi
call   1050 <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
mov    0x2dfd(%rip),%rax
mov    (%rax),%ecx
not    %ecx
and    (%rbx),%ecx
and    $0xfffffff8,%ecx
mov    %ecx,(%rbx)
or     %ebp,%ecx
or     (%rax),%ecx
lea    0x1(%r13),%rax
mov    %rax,0x8(%rsp)
mov    %ecx,(%rbx)
lea    -0x1(%r12),%rax
cmp    $0x2,%r12
jb     1259 <c2i_ASN1_BIT_STRING+0xf9>
mov    %rax,%rdi
mov    %rax,(%rsp)
call   1070 <malloc@plt>
test   %rax,%rax
je     1290 <c2i_ASN1_BIT_STRING+0x130>
mov    %rax,%rcx
mov    %rax,%rdi
mov    %rcx,0x10(%rsp)
mov    0x8(%rsp),%rsi
mov    (%rsp),%rdx
call   1060 <memcpy@plt>
mov    $0xff,%eax
mov    %ebp,%ecx
shl    %cl,%eax
mov    0x10(%rsp),%rcx
and    %al,-0x2(%r12,%rcx,1)
add    %r12,%r13
mov    %rcx,%r12
mov    (%rsp),%rbp
jmp    1264 <c2i_ASN1_BIT_STRING+0x104>
xor    %r12d,%r12d
mov    %rax,%rbp
mov    0x8(%rsp),%r13
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
mov    %r12,0x8(%rbx)
mov    %ebp,0x10(%rbx)
mov    0x2d7d(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rbx)
test   %r14,%r14
je     1288 <c2i_ASN1_BIT_STRING+0x128>
mov    %rbx,(%r14)
mov    %r13,(%r15)
jmp    11d2 <c2i_ASN1_BIT_STRING+0x72>
mov    0x2d39(%rip),%rax
jmp    11b7 <c2i_ASN1_BIT_STRING+0x57>

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

LLVM IR (-O2):
%struct.TYPE_6__ = type { i32, i8*, i32, i32 }
@ASN1_R_STRING_TOO_SHORT = global i32 0
@ASN1_R_INVALID_BIT_STRING_BITS_LEFT = 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
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__* (...) @ASN1_BIT_STRING_new()
%12 = icmp eq %struct.TYPE_6__* %11, null
br i1 %12, label %67, 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 = icmp ugt i8 %17, 7
br i1 %19, label %56, label %20
20: ; preds = %13
%21 = load i32, i32* @ASN1_STRING_FLAG_BITS_LEFT
%22 = or i32 %21, 7
%23 = xor i32 %22, -1
%24 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 0
%25 = load i32, i32* %24
%26 = and i32 %25, %23
store i32 %26, i32* %24
%27 = load i32, i32* @ASN1_STRING_FLAG_BITS_LEFT
%28 = or i32 %26, %18
%29 = or i32 %28, %27
store i32 %29, i32* %24
%30 = add nsw i64 %2, -1
%31 = icmp ugt i64 %2, 1
br i1 %31, label %32, label %44
32: ; preds = %20
%33 = tail call i8* @malloc(i64 %30)
%34 = icmp eq i8* %33, null
br i1 %34, label %56, label %35
35: ; preds = %32
%36 = tail call i32 @memcpy(i8* %33, i8* %16, i64 %30)
%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 = %20, %35
%45 = phi i8* [ %43, %35 ], [ %16, %20 ]
%46 = phi i8* [ %33, %35 ], [ null, %20 ]
%47 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 1
%48 = load i8*, i8** %47
%49 = tail call i32 @free(i8* %48)
store i8* %46, i8** %47
%50 = trunc i64 %30 to i32
%51 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i64 0, i32 2
store i32 %50, i32* %51
%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* %45, i8** %1
br label %67
56: ; preds = %32, %13, %3
%57 = phi i32* [ @ASN1_R_STRING_TOO_SHORT, %3 ], [ @ASN1_R_INVALID_BIT_STRING_BITS_LEFT, %13 ], [ @ERR_R_MALLOC_FAILURE, %32 ]
%58 = phi %struct.TYPE_6__* [ null, %3 ], [ %14, %13 ], [ %14, %32 ]
%59 = load i32, i32* %57
%60 = tail call i32 @ASN1error(i32 %59)
%61 = icmp eq %struct.TYPE_6__** %0, null
br i1 %61, label %65, label %62
62: ; preds = %56
%63 = load %struct.TYPE_6__*, %struct.TYPE_6__** %0
%64 = icmp eq %struct.TYPE_6__* %63, %58
br i1 %64, label %67, label %65
65: ; preds = %62, %56
%66 = tail call i32 @ASN1_BIT_STRING_free(%struct.TYPE_6__* %58)
br label %67
67: ; preds = %62, %65, %10, %55
%68 = phi %struct.TYPE_6__* [ %14, %55 ], [ null, %10 ], [ null, %65 ], [ null, %62 ]
ret %struct.TYPE_6__* %68
}