#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_5__ TYPE_1__;

/* Type definitions */
struct TYPE_5__ {
  int flags;
  int /*<<< orphan*/ tag;
};
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_TLC;
typedef TYPE_1__ ASN1_TEMPLATE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_R_EXPLICIT_LENGTH_MISMATCH;
int /*<<< orphan*/ ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED;
int /*<<< orphan*/ ASN1_R_MISSING_EOC;
int ASN1_TFLG_EXPTAG;
int ASN1_TFLG_TAG_CLASS;
int /*<<< orphan*/ ASN1_template_free(int /*<<< orphan*/ **, TYPE_1__ const *);
int /*<<< orphan*/ ASN1error(int /*<<< orphan*/);
int /*<<< orphan*/ ERR_R_NESTED_ASN1_ERROR;
int /*<<< orphan*/ asn1_check_eoc(unsigned char const **, long);
int asn1_check_tlen(long *, int /*<<< orphan*/ *, int /*<<< orphan*/ *, char *,
                    char *, unsigned char const **, long, int /*<<< orphan*/,
                    int, char, int /*<<< orphan*/ *);
int asn1_template_noexp_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                            TYPE_1__ const *, char, int /*<<< orphan*/ *, int);
int asn1_template_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long inlen,
                         const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx,
                         int depth) {
  int flags, aclass;
  int ret;
  long len;
  const unsigned char *p, *q;
  char exp_eoc;
  if (!val)
    return 0;
  flags = tt->flags;
  aclass = flags & ASN1_TFLG_TAG_CLASS;
  p = *in;
  if (flags & ASN1_TFLG_EXPTAG) {
    char cst;
    ret = asn1_check_tlen(&len, NULL, NULL, &exp_eoc, &cst, &p, inlen, tt->tag,
                          aclass, opt, ctx);
    q = p;
    if (!ret) {
      ASN1error(ERR_R_NESTED_ASN1_ERROR);
      return 0;
    } else if (ret == -1)
      return -1;
    if (!cst) {
      ASN1error(ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED);
      return 0;
    }
    ret = asn1_template_noexp_d2i(val, &p, len, tt, 0, ctx, depth);
    if (!ret) {
      ASN1error(ERR_R_NESTED_ASN1_ERROR);
      return 0;
    }
    len -= p - q;
    if (exp_eoc) {
      if (!asn1_check_eoc(&p, len)) {
        ASN1error(ASN1_R_MISSING_EOC);
        goto err;
      }
    } else {
      if (len) {
        ASN1error(ASN1_R_EXPLICIT_LENGTH_MISMATCH);
        goto err;
      }
    }
  } else
    return asn1_template_noexp_d2i(val, in, inlen, tt, opt, ctx, depth);
  *in = p;
  return 1;
err:
  ASN1_template_free(val, tt);
  return 0;
}


x86 assembly (clang, -O0):
<asn1_template_ex_d2i>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x90,%rsp
mov    %r8b,%al
mov    0x10(%rbp),%r8d
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %al,-0x39(%rbp)
mov    %r9,-0x48(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1193 <asn1_template_ex_d2i+0x43>
movl   $0x0,-0x14(%rbp)
jmp    13a0 <asn1_template_ex_d2i+0x250>
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    0x2e32(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x68(%rbp)
mov    -0x4c(%rbp),%eax
mov    0x2df8(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1346 <asn1_template_ex_d2i+0x1f6>
mov    -0x30(%rbp),%r14
mov    -0x38(%rbp),%rax
mov    0x4(%rax),%ebx
mov    -0x50(%rbp),%r11d
mov    -0x39(%rbp),%r10b
mov    -0x48(%rbp),%rax
lea    -0x60(%rbp),%rdi
xor    %ecx,%ecx
mov    %ecx,%edx
lea    -0x71(%rbp),%rcx
lea    -0x72(%rbp),%r8
lea    -0x68(%rbp),%r9
mov    %rdx,%rsi
mov    %r14,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
movsbl %r10b,%r10d
mov    %r10d,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1030 <asn1_check_tlen@plt>
mov    %eax,-0x54(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x70(%rbp)
cmpl   $0x0,-0x54(%rbp)
jne    1248 <asn1_template_ex_d2i+0xf8>
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
call   1070 <ASN1error@plt>
movl   $0x0,-0x14(%rbp)
jmp    13a0 <asn1_template_ex_d2i+0x250>
cmpl   $0xffffffff,-0x54(%rbp)
jne    125e <asn1_template_ex_d2i+0x10e>
movl   $0xffffffff,-0x14(%rbp)
jmp    13a0 <asn1_template_ex_d2i+0x250>
jmp    1263 <asn1_template_ex_d2i+0x113>
cmpb   $0x0,-0x72(%rbp)
jne    1287 <asn1_template_ex_d2i+0x137>
mov    0x2d4c(%rip),%rax
mov    (%rax),%edi
call   1070 <ASN1error@plt>
movl   $0x0,-0x14(%rbp)
jmp    13a0 <asn1_template_ex_d2i+0x250>
mov    -0x20(%rbp),%rdi
mov    -0x60(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%r9
mov    0x10(%rbp),%eax
lea    -0x68(%rbp),%rsi
xor    %r8d,%r8d
mov    %eax,(%rsp)
call   1060 <asn1_template_noexp_d2i@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
jne    12d0 <asn1_template_ex_d2i+0x180>
mov    0x2d13(%rip),%rax
mov    (%rax),%edi
call   1070 <ASN1error@plt>
movl   $0x0,-0x14(%rbp)
jmp    13a0 <asn1_template_ex_d2i+0x250>
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%rax
sub    %rax,%rcx
mov    -0x60(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x60(%rbp)
cmpb   $0x0,-0x71(%rbp)
je     131e <asn1_template_ex_d2i+0x1ce>
mov    -0x60(%rbp),%rsi
lea    -0x68(%rbp),%rdi
call   1050 <asn1_check_eoc@plt>
cmp    $0x0,%eax
jne    1319 <asn1_template_ex_d2i+0x1c9>
mov    0x2cd3(%rip),%rax
mov    (%rax),%edi
call   1070 <ASN1error@plt>
jmp    138c <asn1_template_ex_d2i+0x23c>
jmp    1341 <asn1_template_ex_d2i+0x1f1>
cmpq   $0x0,-0x60(%rbp)
je     133c <asn1_template_ex_d2i+0x1ec>
mov    0x2cb8(%rip),%rax
mov    (%rax),%edi
call   1070 <ASN1error@plt>
jmp    138c <asn1_template_ex_d2i+0x23c>
jmp    1341 <asn1_template_ex_d2i+0x1f1>
jmp    1375 <asn1_template_ex_d2i+0x225>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x39(%rbp),%r8b
mov    -0x48(%rbp),%r9
mov    0x10(%rbp),%eax
movsbl %r8b,%r8d
mov    %eax,(%rsp)
call   1060 <asn1_template_noexp_d2i@plt>
mov    %eax,-0x14(%rbp)
jmp    13a0 <asn1_template_ex_d2i+0x250>
mov    -0x68(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x14(%rbp)
jmp    13a0 <asn1_template_ex_d2i+0x250>
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <ASN1_template_free@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<asn1_template_ex_d2i>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
test   %rdi,%rdi
je     128f <asn1_template_ex_d2i+0x13f>
mov    %r9,%r13
mov    %rcx,%r14
mov    %rdx,%rax
mov    %rsi,%r15
mov    %rdi,%r12
mov    0x60(%rsp),%esi
mov    (%rcx),%ecx
mov    0x2e55(%rip),%rdx
mov    (%rdx),%ebp
mov    (%r15),%rdx
mov    %rdx,0x10(%rsp)
mov    0x2e24(%rip),%rdx
test   %ecx,(%rdx)
je     125b <asn1_template_ex_d2i+0x10b>
mov    %rsi,0x20(%rsp)
and    %ecx,%ebp
mov    0x4(%r14),%r10d
sub    $0x8,%rsp
movsbl %r8b,%ebx
lea    0x20(%rsp),%rdi
lea    0x17(%rsp),%rcx
lea    0x16(%rsp),%r8
lea    0x18(%rsp),%r9
xor    %esi,%esi
xor    %edx,%edx
push   %r13
push   %rbx
push   %rbp
push   %r10
push   %rax
call   1030 <asn1_check_tlen@plt>
add    $0x30,%rsp
cmp    $0xffffffff,%eax
je     1291 <asn1_template_ex_d2i+0x141>
mov    0x2de9(%rip),%rbx
test   %eax,%eax
je     1288 <asn1_template_ex_d2i+0x138>
cmpb   $0x0,0xe(%rsp)
je     1281 <asn1_template_ex_d2i+0x131>
mov    0x10(%rsp),%rbp
mov    0x18(%rsp),%rdx
sub    $0x8,%rsp
lea    0x18(%rsp),%rsi
mov    %r12,%rdi
mov    %r14,%rcx
xor    %r8d,%r8d
mov    %r13,%r9
push   0x28(%rsp)
call   1060 <asn1_template_noexp_d2i@plt>
add    $0x10,%rsp
test   %eax,%eax
je     1288 <asn1_template_ex_d2i+0x138>
mov    0x10(%rsp),%rax
sub    %rax,%rbp
add    0x18(%rsp),%rbp
mov    %rbp,0x18(%rsp)
cmpb   $0x0,0xf(%rsp)
je     12a0 <asn1_template_ex_d2i+0x150>
lea    0x10(%rsp),%rdi
mov    %rbp,%rsi
call   1050 <asn1_check_eoc@plt>
test   %eax,%eax
je     12b8 <asn1_template_ex_d2i+0x168>
mov    0x10(%rsp),%rax
jmp    12ae <asn1_template_ex_d2i+0x15e>
movsbl %r8b,%r8d
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
mov    %r13,%r9
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <asn1_template_noexp_d2i@plt>
mov    0x2d38(%rip),%rbx
mov    (%rbx),%edi
call   1070 <ASN1error@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
test   %rbp,%rbp
je     12ae <asn1_template_ex_d2i+0x15e>
mov    0x2d3c(%rip),%rax
jmp    12bf <asn1_template_ex_d2i+0x16f>
mov    %rax,(%r15)
mov    $0x1,%eax
jmp    1291 <asn1_template_ex_d2i+0x141>
mov    0x2d21(%rip),%rax
mov    (%rax),%edi
call   1070 <ASN1error@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <ASN1_template_free@plt>
jmp    128f <asn1_template_ex_d2i+0x13f>

LLVM IR (-O0):
%struct.TYPE_5__ = type { i32, i32 }
@ASN1_TFLG_TAG_CLASS = global i32 0
@ASN1_TFLG_EXPTAG = global i32 0
@ERR_R_NESTED_ASN1_ERROR = global i32 0
@ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED = global i32 0
@ASN1_R_MISSING_EOC = global i32 0
@ASN1_R_EXPLICIT_LENGTH_MISMATCH = global i32 0
define i32 @asn1_template_ex_d2i(i32** %0, i8** %1, i64 %2, %struct.TYPE_5__* %3, i8 signext %4, i32* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32**
%10 = alloca i8**
%11 = alloca i64
%12 = alloca %struct.TYPE_5__*
%13 = alloca i8
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i64
%20 = alloca i8*
%21 = alloca i8*
%22 = alloca i8
%23 = alloca i8
store i32** %0, i32*** %9
store i8** %1, i8*** %10
store i64 %2, i64* %11
store %struct.TYPE_5__* %3, %struct.TYPE_5__** %12
store i8 %4, i8* %13
store i32* %5, i32** %14
store i32 %6, i32* %15
%24 = load i32**, i32*** %9
%25 = icmp ne i32** %24, null
br i1 %25, label %27, label %26
26: ; preds = %7
store i32 0, i32* %8
br label %120
27: ; preds = %7
%28 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%29 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %28, i32 0, i32 0
%30 = load i32, i32* %29
store i32 %30, i32* %16
%31 = load i32, i32* %16
%32 = load i32, i32* @ASN1_TFLG_TAG_CLASS
%33 = and i32 %31, %32
store i32 %33, i32* %17
%34 = load i8**, i8*** %10
%35 = load i8*, i8** %34
store i8* %35, i8** %20
%36 = load i32, i32* %16
%37 = load i32, i32* @ASN1_TFLG_EXPTAG
%38 = and i32 %36, %37
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %104
40: ; preds = %27
%41 = load i64, i64* %11
%42 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%43 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %42, i32 0, i32 1
%44 = load i32, i32* %43
%45 = load i32, i32* %17
%46 = load i8, i8* %13
%47 = load i32*, i32** %14
%48 = call i32 @asn1_check_tlen(i64* %19, i32* null, i32* null, i8* %22, i8* %23, i8** %20, i64 %41, i32 %44, i32 %45, i8 signext %46, i32* %47)
store i32 %48, i32* %18
%49 = load i8*, i8** %20
store i8* %49, i8** %21
%50 = load i32, i32* %18
%51 = icmp ne i32 %50, 0
br i1 %51, label %55, label %52
52: ; preds = %40
%53 = load i32, i32* @ERR_R_NESTED_ASN1_ERROR
%54 = call i32 @ASN1error(i32 %53)
store i32 0, i32* %8
br label %120
55: ; preds = %40
%56 = load i32, i32* %18
%57 = icmp eq i32 %56, -1
br i1 %57, label %58, label %59
58: ; preds = %55
store i32 -1, i32* %8
br label %120
59: ; preds = %55
br label %60
60: ; preds = %59
%61 = load i8, i8* %23
%62 = icmp ne i8 %61, 0
br i1 %62, label %66, label %63
63: ; preds = %60
%64 = load i32, i32* @ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED
%65 = call i32 @ASN1error(i32 %64)
store i32 0, i32* %8
br label %120
66: ; preds = %60
%67 = load i32**, i32*** %9
%68 = load i64, i64* %19
%69 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%70 = load i32*, i32** %14
%71 = load i32, i32* %15
%72 = call i32 @asn1_template_noexp_d2i(i32** %67, i8** %20, i64 %68, %struct.TYPE_5__* %69, i8 signext 0, i32* %70, i32 %71)
store i32 %72, i32* %18
%73 = load i32, i32* %18
%74 = icmp ne i32 %73, 0
br i1 %74, label %78, label %75
75: ; preds = %66
%76 = load i32, i32* @ERR_R_NESTED_ASN1_ERROR
%77 = call i32 @ASN1error(i32 %76)
store i32 0, i32* %8
br label %120
78: ; preds = %66
%79 = load i8*, i8** %20
%80 = load i8*, i8** %21
%81 = ptrtoint i8* %79 to i64
%82 = ptrtoint i8* %80 to i64
%83 = sub i64 %81, %82
%84 = load i64, i64* %19
%85 = sub nsw i64 %84, %83
store i64 %85, i64* %19
%86 = load i8, i8* %22
%87 = icmp ne i8 %86, 0
br i1 %87, label %88, label %96
88: ; preds = %78
%89 = load i64, i64* %19
%90 = call i32 @asn1_check_eoc(i8** %20, i64 %89)
%91 = icmp ne i32 %90, 0
br i1 %91, label %95, label %92
92: ; preds = %88
%93 = load i32, i32* @ASN1_R_MISSING_EOC
%94 = call i32 @ASN1error(i32 %93)
br label %116
95: ; preds = %88
br label %103
96: ; preds = %78
%97 = load i64, i64* %19
%98 = icmp ne i64 %97, 0
br i1 %98, label %99, label %102
99: ; preds = %96
%100 = load i32, i32* @ASN1_R_EXPLICIT_LENGTH_MISMATCH
%101 = call i32 @ASN1error(i32 %100)
br label %116
102: ; preds = %96
br label %103
103: ; preds = %102, %95
br label %113
104: ; preds = %27
%105 = load i32**, i32*** %9
%106 = load i8**, i8*** %10
%107 = load i64, i64* %11
%108 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%109 = load i8, i8* %13
%110 = load i32*, i32** %14
%111 = load i32, i32* %15
%112 = call i32 @asn1_template_noexp_d2i(i32** %105, i8** %106, i64 %107, %struct.TYPE_5__* %108, i8 signext %109, i32* %110, i32 %111)
store i32 %112, i32* %8
br label %120
113: ; preds = %103
%114 = load i8*, i8** %20
%115 = load i8**, i8*** %10
store i8* %114, i8** %115
store i32 1, i32* %8
br label %120
116: ; preds = %99, %92
%117 = load i32**, i32*** %9
%118 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%119 = call i32 @ASN1_template_free(i32** %117, %struct.TYPE_5__* %118)
store i32 0, i32* %8
br label %120
120: ; preds = %116, %113, %104, %75, %63, %58, %52, %26
%121 = load i32, i32* %8
ret i32 %121
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32, i32 }
@ASN1_TFLG_TAG_CLASS = global i32 0
@ASN1_TFLG_EXPTAG = global i32 0
@ERR_R_NESTED_ASN1_ERROR = global i32 0
@ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED = global i32 0
@ASN1_R_MISSING_EOC = global i32 0
@ASN1_R_EXPLICIT_LENGTH_MISMATCH = global i32 0
define i32 @asn1_template_ex_d2i(i32** %0, i8** %1, i64 %2, %struct.TYPE_5__* %3, i8 signext %4, i32* %5, i32 %6) {
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i8
%11 = alloca i8
%12 = bitcast i64* %8 to i8*
%13 = bitcast i8** %9 to i8*
%14 = icmp eq i32** %0, null
br i1 %14, label %67, label %15
15: ; preds = %7
%16 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 0
%17 = load i32, i32* %16
%18 = load i32, i32* @ASN1_TFLG_TAG_CLASS
%19 = load i8*, i8** %1
store i8* %19, i8** %9
%20 = load i32, i32* @ASN1_TFLG_EXPTAG
%21 = and i32 %20, %17
%22 = icmp eq i32 %21, 0
br i1 %22, label %58, label %23
23: ; preds = %15
%24 = and i32 %18, %17
%25 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 1
%26 = load i32, i32* %25
%27 = call i32 @asn1_check_tlen(i64* %8, i32* null, i32* null, i8* %10, i8* %11, i8** %9, i64 %2, i32 %26, i32 %24, i8 signext %4, i32* %5)
%28 = load i8*, i8** %9
switch i32 %27, label %29 [
i32 0, label %52
i32 -1, label %56
]
29: ; preds = %23
%30 = load i8, i8* %11
%31 = icmp eq i8 %30, 0
br i1 %31, label %52, label %32
32: ; preds = %29
%33 = load i64, i64* %8
%34 = call i32 @asn1_template_noexp_d2i(i32** %0, i8** %9, i64 %33, %struct.TYPE_5__* %3, i8 signext 0, i32* %5, i32 %6)
%35 = icmp eq i32 %34, 0
br i1 %35, label %52, label %36
36: ; preds = %32
%37 = load i8*, i8** %9
%38 = ptrtoint i8* %37 to i64
%39 = ptrtoint i8* %28 to i64
%40 = sub i64 %39, %38
%41 = load i64, i64* %8
%42 = add i64 %40, %41
store i64 %42, i64* %8
%43 = load i8, i8* %10
%44 = icmp eq i8 %43, 0
br i1 %44, label %50, label %45
45: ; preds = %36
%46 = call i32 @asn1_check_eoc(i8** %9, i64 %42)
%47 = icmp eq i32 %46, 0
br i1 %47, label %62, label %48
48: ; preds = %45
%49 = load i8*, i8** %9
br label %60
50: ; preds = %36
%51 = icmp eq i64 %42, 0
br i1 %51, label %60, label %62
52: ; preds = %32, %29, %23
%53 = phi i32* [ @ERR_R_NESTED_ASN1_ERROR, %23 ], [ @ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED, %29 ], [ @ERR_R_NESTED_ASN1_ERROR, %32 ]
%54 = load i32, i32* %53
%55 = call i32 @ASN1error(i32 %54)
br label %56
56: ; preds = %52, %23
%57 = phi i32 [ %27, %23 ], [ 0, %52 ]
br label %67
58: ; preds = %15
%59 = tail call i32 @asn1_template_noexp_d2i(i32** %0, i8** %1, i64 %2, %struct.TYPE_5__* %3, i8 signext %4, i32* %5, i32 %6)
br label %67
60: ; preds = %48, %50
%61 = phi i8* [ %49, %48 ], [ %37, %50 ]
store i8* %61, i8** %1
br label %67
62: ; preds = %50, %45
%63 = phi i32* [ @ASN1_R_MISSING_EOC, %45 ], [ @ASN1_R_EXPLICIT_LENGTH_MISMATCH, %50 ]
%64 = load i32, i32* %63
%65 = call i32 @ASN1error(i32 %64)
%66 = call i32 @ASN1_template_free(i32** %0, %struct.TYPE_5__* %3)
br label %67
67: ; preds = %56, %7, %62, %60, %58
%68 = phi i32 [ 0, %62 ], [ 1, %60 ], [ %59, %58 ], [ 0, %7 ], [ %57, %56 ]
ret i32 %68
}