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

/* Type definitions */
typedef int /*<<< orphan*/ X509V3_EXT_METHOD;
struct TYPE_2__ {
  scalar_t__ onlyuser;
  scalar_t__ onlyCA;
  scalar_t__ indirectCRL;
  scalar_t__ onlyattr;
  scalar_t__ onlysomereasons;
  scalar_t__ distpoint;
};
typedef TYPE_1__ ISSUING_DIST_POINT;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_printf(int /*<<< orphan*/ *, char *, int, char *);
int /*<<< orphan*/ print_distpoint(int /*<<< orphan*/ *, scalar_t__, int);
int /*<<< orphan*/ print_reasons(int /*<<< orphan*/ *, char *, scalar_t__, int);
int i2r_idp(const X509V3_EXT_METHOD *method, void *pidp, BIO *out, int indent) {
  ISSUING_DIST_POINT *idp = pidp;
  if (idp->distpoint)
    print_distpoint(out, idp->distpoint, indent);
  if (idp->onlyuser > 0)
    BIO_printf(out, "%*sOnly User Certificates\n", indent, "");
  if (idp->onlyCA > 0)
    BIO_printf(out, "%*sOnly CA Certificates\n", indent, "");
  if (idp->indirectCRL > 0)
    BIO_printf(out, "%*sIndirect CRL\n", indent, "");
  if (idp->onlysomereasons)
    print_reasons(out, "Only Some Reasons", idp->onlysomereasons, indent);
  if (idp->onlyattr > 0)
    BIO_printf(out, "%*sOnly Attribute Certificates\n", indent, "");
  if (!idp->distpoint && (idp->onlyuser <= 0) && (idp->onlyCA <= 0) &&
      (idp->indirectCRL <= 0) && !idp->onlysomereasons && (idp->onlyattr <= 0))
    BIO_printf(out, "%*s<EMPTY>\n", indent, "");
  return 1;
}


x86 assembly (clang, -O0):
<i2r_idp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x28(%rax)
je     1172 <i2r_idp+0x42>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    0x28(%rax),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <print_distpoint@plt>
mov    -0x28(%rbp),%rax
cmpq   $0x0,(%rax)
jle    119a <i2r_idp+0x6a>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xe72(%rip),%rsi
lea    0xeed(%rip),%rcx
call   1030 <BIO_printf@plt>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jle    11c3 <i2r_idp+0x93>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xe64(%rip),%rsi
lea    0xec4(%rip),%rcx
call   1030 <BIO_printf@plt>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x10(%rax)
jle    11ec <i2r_idp+0xbc>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xe54(%rip),%rsi
lea    0xe9b(%rip),%rcx
call   1030 <BIO_printf@plt>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x20(%rax)
je     1216 <i2r_idp+0xe6>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    0x20(%rax),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xe34(%rip),%rsi
call   1050 <print_reasons@plt>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x18(%rax)
jle    123f <i2r_idp+0x10f>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xe24(%rip),%rsi
lea    0xe48(%rip),%rcx
call   1030 <BIO_printf@plt>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x28(%rax)
jne    12b2 <i2r_idp+0x182>
mov    -0x28(%rbp),%rax
cmpq   $0x0,(%rax)
jg     12b2 <i2r_idp+0x182>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jg     12b2 <i2r_idp+0x182>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x10(%rax)
jg     12b2 <i2r_idp+0x182>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x20(%rax)
jne    12b2 <i2r_idp+0x182>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x18(%rax)
jg     12b2 <i2r_idp+0x182>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xdd1(%rip),%rsi
lea    0xdd5(%rip),%rcx
call   1030 <BIO_printf@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2r_idp>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    0x28(%rsi),%rsi
test   %rsi,%rsi
je     1151 <i2r_idp+0x21>
mov    %rbx,%rdi
mov    %r14d,%edx
call   1040 <print_distpoint@plt>
cmpq   $0x0,0x0(%rbp)
jle    1171 <i2r_idp+0x41>
lea    0xea1(%rip),%rsi
lea    0xf1c(%rip),%rcx
mov    %rbx,%rdi
mov    %r14d,%edx
call   1030 <BIO_printf@plt>
cmpq   $0x0,0x8(%rbp)
jle    1191 <i2r_idp+0x61>
lea    0xe9c(%rip),%rsi
lea    0xefc(%rip),%rcx
mov    %rbx,%rdi
mov    %r14d,%edx
call   1030 <BIO_printf@plt>
cmpq   $0x0,0x10(%rbp)
jle    11b1 <i2r_idp+0x81>
lea    0xe95(%rip),%rsi
lea    0xedc(%rip),%rcx
mov    %rbx,%rdi
mov    %r14d,%edx
call   1030 <BIO_printf@plt>
mov    0x20(%rbp),%rdx
test   %rdx,%rdx
je     11cc <i2r_idp+0x9c>
lea    0xe84(%rip),%rsi
mov    %rbx,%rdi
mov    %r14d,%ecx
call   1050 <print_reasons@plt>
cmpq   $0x0,0x18(%rbp)
jle    11ec <i2r_idp+0xbc>
lea    0xe7d(%rip),%rsi
lea    0xea1(%rip),%rcx
mov    %rbx,%rdi
mov    %r14d,%edx
call   1030 <BIO_printf@plt>
cmpq   $0x0,0x28(%rbp)
jne    122f <i2r_idp+0xff>
cmpq   $0x0,0x0(%rbp)
jg     122f <i2r_idp+0xff>
cmpq   $0x0,0x8(%rbp)
jg     122f <i2r_idp+0xff>
cmpq   $0x0,0x10(%rbp)
jg     122f <i2r_idp+0xff>
cmpq   $0x0,0x20(%rbp)
jne    122f <i2r_idp+0xff>
cmpq   $0x0,0x18(%rbp)
jg     122f <i2r_idp+0xff>
lea    0xe5a(%rip),%rsi
lea    0xe5e(%rip),%rcx
mov    %rbx,%rdi
mov    %r14d,%edx
call   1030 <BIO_printf@plt>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64, i64, i64, i64, i64, i64 }
@.str = [27 x i8] c"%*sOnly User Certificates\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [25 x i8] c"%*sOnly CA Certificates\0A\00"
@.str.3 = [17 x i8] c"%*sIndirect CRL\0A\00"
@.str.4 = [18 x i8] c"Only Some Reasons\00"
@.str.5 = [32 x i8] c"%*sOnly Attribute Certificates\0A\00"
@.str.6 = [12 x i8] c"%*s<EMPTY>\0A\00"
define i32 @i2r_idp(i32* %0, i8* %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca %struct.TYPE_2__*
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %6
%11 = bitcast i8* %10 to %struct.TYPE_2__*
store %struct.TYPE_2__* %11, %struct.TYPE_2__** %9
%12 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%13 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %12, i32 0, i32 5
%14 = load i64, i64* %13
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %23
16: ; preds = %4
%17 = load i32*, i32** %7
%18 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%19 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %18, i32 0, i32 5
%20 = load i64, i64* %19
%21 = load i32, i32* %8
%22 = call i32 @print_distpoint(i32* %17, i64 %20, i32 %21)
br label %23
23: ; preds = %16, %4
%24 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%25 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %24, i32 0, i32 0
%26 = load i64, i64* %25
%27 = icmp sgt i64 %26, 0
br i1 %27, label %28, label %32
28: ; preds = %23
%29 = load i32*, i32** %7
%30 = load i32, i32* %8
%31 = call i32 @BIO_printf(i32* %29, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %30, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %28, %23
%33 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%34 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %33, i32 0, i32 1
%35 = load i64, i64* %34
%36 = icmp sgt i64 %35, 0
br i1 %36, label %37, label %41
37: ; preds = %32
%38 = load i32*, i32** %7
%39 = load i32, i32* %8
%40 = call i32 @BIO_printf(i32* %38, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %39, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %41
41: ; preds = %37, %32
%42 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%43 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %42, i32 0, i32 2
%44 = load i64, i64* %43
%45 = icmp sgt i64 %44, 0
br i1 %45, label %46, label %50
46: ; preds = %41
%47 = load i32*, i32** %7
%48 = load i32, i32* %8
%49 = call i32 @BIO_printf(i32* %47, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %48, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %50
50: ; preds = %46, %41
%51 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%52 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %51, i32 0, i32 4
%53 = load i64, i64* %52
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %62
55: ; preds = %50
%56 = load i32*, i32** %7
%57 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%58 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %57, i32 0, i32 4
%59 = load i64, i64* %58
%60 = load i32, i32* %8
%61 = call i32 @print_reasons(i32* %56, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i64 %59, i32 %60)
br label %62
62: ; preds = %55, %50
%63 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%64 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %63, i32 0, i32 3
%65 = load i64, i64* %64
%66 = icmp sgt i64 %65, 0
br i1 %66, label %67, label %71
67: ; preds = %62
%68 = load i32*, i32** %7
%69 = load i32, i32* %8
%70 = call i32 @BIO_printf(i32* %68, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 %69, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %71
71: ; preds = %67, %62
%72 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%73 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %72, i32 0, i32 5
%74 = load i64, i64* %73
%75 = icmp ne i64 %74, 0
br i1 %75, label %105, label %76
76: ; preds = %71
%77 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%78 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %77, i32 0, i32 0
%79 = load i64, i64* %78
%80 = icmp sle i64 %79, 0
br i1 %80, label %81, label %105
81: ; preds = %76
%82 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%83 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %82, i32 0, i32 1
%84 = load i64, i64* %83
%85 = icmp sle i64 %84, 0
br i1 %85, label %86, label %105
86: ; preds = %81
%87 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%88 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %87, i32 0, i32 2
%89 = load i64, i64* %88
%90 = icmp sle i64 %89, 0
br i1 %90, label %91, label %105
91: ; preds = %86
%92 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%93 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %92, i32 0, i32 4
%94 = load i64, i64* %93
%95 = icmp ne i64 %94, 0
br i1 %95, label %105, label %96
96: ; preds = %91
%97 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%98 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %97, i32 0, i32 3
%99 = load i64, i64* %98
%100 = icmp sle i64 %99, 0
br i1 %100, label %101, label %105
101: ; preds = %96
%102 = load i32*, i32** %7
%103 = load i32, i32* %8
%104 = call i32 @BIO_printf(i32* %102, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %103, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %105
105: ; preds = %101, %96, %91, %86, %81, %76, %71
ret i32 1
}

LLVM IR (-O2):
@.str = [27 x i8] c"%*sOnly User Certificates\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [25 x i8] c"%*sOnly CA Certificates\0A\00"
@.str.3 = [17 x i8] c"%*sIndirect CRL\0A\00"
@.str.4 = [18 x i8] c"Only Some Reasons\00"
@.str.5 = [32 x i8] c"%*sOnly Attribute Certificates\0A\00"
@.str.6 = [12 x i8] c"%*s<EMPTY>\0A\00"
define i32 @i2r_idp(i32* nocapture readnone %0, i8* nocapture %1, i32* %2, i32 %3) {
%5 = getelementptr inbounds i8, i8* %1, i64 40
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = tail call i32 @print_distpoint(i32* %2, i64 %7, i32 %3)
br label %11
11: ; preds = %9, %4
%12 = bitcast i8* %1 to i64*
%13 = load i64, i64* %12
%14 = icmp sgt i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = tail call i32 @BIO_printf(i32* %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %11
%18 = getelementptr inbounds i8, i8* %1, i64 8
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %19
%21 = icmp sgt i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %17
%23 = tail call i32 @BIO_printf(i32* %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %17
%25 = getelementptr inbounds i8, i8* %1, i64 16
%26 = bitcast i8* %25 to i64*
%27 = load i64, i64* %26
%28 = icmp sgt i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %24
%30 = tail call i32 @BIO_printf(i32* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %29, %24
%32 = getelementptr inbounds i8, i8* %1, i64 32
%33 = bitcast i8* %32 to i64*
%34 = load i64, i64* %33
%35 = icmp eq i64 %34, 0
br i1 %35, label %38, label %36
36: ; preds = %31
%37 = tail call i32 @print_reasons(i32* %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i64 %34, i32 %3)
br label %38
38: ; preds = %36, %31
%39 = getelementptr inbounds i8, i8* %1, i64 24
%40 = bitcast i8* %39 to i64*
%41 = load i64, i64* %40
%42 = icmp sgt i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %38
%44 = tail call i32 @BIO_printf(i32* %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %45
45: ; preds = %43, %38
%46 = load i64, i64* %6
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %65
48: ; preds = %45
%49 = load i64, i64* %12
%50 = icmp slt i64 %49, 1
br i1 %50, label %51, label %65
51: ; preds = %48
%52 = load i64, i64* %19
%53 = icmp slt i64 %52, 1
br i1 %53, label %54, label %65
54: ; preds = %51
%55 = load i64, i64* %26
%56 = icmp slt i64 %55, 1
br i1 %56, label %57, label %65
57: ; preds = %54
%58 = load i64, i64* %33
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %65
60: ; preds = %57
%61 = load i64, i64* %40
%62 = icmp slt i64 %61, 1
br i1 %62, label %63, label %65
63: ; preds = %60
%64 = tail call i32 @BIO_printf(i32* %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %65
65: ; preds = %63, %60, %57, %54, %51, %48, %45
ret i32 1
}