#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_7__ TYPE_3__;
typedef struct TYPE_6__ TYPE_2__;
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ X509V3_EXT_METHOD;
struct TYPE_7__ {
  TYPE_2__ *proxyPolicy;
  scalar_t__ pcPathLengthConstraint;
};
struct TYPE_6__ {
  TYPE_1__ *policy;
  int /*<<< orphan*/ policyLanguage;
};
struct TYPE_5__ {
  scalar_t__ data;
};
typedef TYPE_3__ PROXY_CERT_INFO_EXTENSION;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_printf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ BIO_puts(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ i2a_ASN1_INTEGER(int /*<<< orphan*/ *, scalar_t__);
int /*<<< orphan*/ i2a_ASN1_OBJECT(int /*<<< orphan*/ *, int /*<<< orphan*/);
int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *pci, BIO *out,
            int indent) {
  BIO_printf(out, "%*sPath Length Constraint: ", indent, "");
  if (pci->pcPathLengthConstraint)
    i2a_ASN1_INTEGER(out, pci->pcPathLengthConstraint);
  else
    BIO_printf(out, "infinite");
  BIO_puts(out, "\n");
  BIO_printf(out, "%*sPolicy Language: ", indent, "");
  i2a_ASN1_OBJECT(out, pci->proxyPolicy->policyLanguage);
  BIO_puts(out, "\n");
  if (pci->proxyPolicy->policy && pci->proxyPolicy->policy->data)
    BIO_printf(out, "%*sPolicy Text: %s\n", indent, "",
               pci->proxyPolicy->policy->data);
  return 1;
}


x86 assembly (clang, -O0):
<i2r_pci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xe9b(%rip),%rsi
lea    0xee1(%rip),%rcx
mov    $0x0,%al
call   1040 <BIO_printf@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     1198 <i2r_pci+0x58>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1060 <i2a_ASN1_INTEGER@plt>
jmp    11aa <i2r_pci+0x6a>
mov    -0x18(%rbp),%rdi
lea    0xe79(%rip),%rsi
mov    $0x0,%al
call   1040 <BIO_printf@plt>
mov    -0x18(%rbp),%rdi
lea    0xe97(%rip),%rsi
call   1050 <BIO_puts@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xe5d(%rip),%rsi
lea    0xe7e(%rip),%rcx
mov    $0x0,%al
call   1040 <BIO_printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%esi
call   1030 <i2a_ASN1_OBJECT@plt>
mov    -0x18(%rbp),%rdi
lea    0xe58(%rip),%rsi
call   1050 <BIO_puts@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmpq   $0x0,(%rax)
je     1247 <i2r_pci+0x107>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
cmpq   $0x0,(%rax)
je     1247 <i2r_pci+0x107>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%r8
lea    0xe01(%rip),%rsi
lea    0xe0d(%rip),%rcx
mov    $0x0,%al
call   1040 <BIO_printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2r_pci>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %rsi,%rbp
lea    0xea9(%rip),%rsi
lea    0xeef(%rip),%rcx
mov    %rdx,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <BIO_printf@plt>
mov    0x8(%rbp),%rsi
test   %rsi,%rsi
je     117e <i2r_pci+0x3e>
mov    %rbx,%rdi
call   1060 <i2a_ASN1_INTEGER@plt>
jmp    118f <i2r_pci+0x4f>
lea    0xe97(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <BIO_printf@plt>
lea    0xeb6(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <BIO_puts@plt>
lea    0xe7d(%rip),%rsi
lea    0xe9e(%rip),%rcx
mov    %rbx,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <BIO_printf@plt>
mov    0x0(%rbp),%rax
mov    0x8(%rax),%esi
mov    %rbx,%rdi
call   1030 <i2a_ASN1_OBJECT@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <BIO_puts@plt>
mov    0x0(%rbp),%rax
mov    (%rax),%rax
test   %rax,%rax
je     1205 <i2r_pci+0xc5>
mov    (%rax),%r8
test   %r8,%r8
je     1205 <i2r_pci+0xc5>
lea    0xe49(%rip),%rsi
lea    0xe55(%rip),%rcx
mov    %rbx,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <BIO_printf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_7__ = type { %struct.TYPE_6__*, i64 }
%struct.TYPE_6__ = type { %struct.TYPE_5__*, i32 }
%struct.TYPE_5__ = type { i64 }
@.str = [28 x i8] c"%*sPath Length Constraint: \00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [9 x i8] c"infinite\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [21 x i8] c"%*sPolicy Language: \00"
@.str.5 = [20 x i8] c"%*sPolicy Text: %s\0A\00"
define i32 @i2r_pci(i32* %0, %struct.TYPE_7__* %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca %struct.TYPE_7__*
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store %struct.TYPE_7__* %1, %struct.TYPE_7__** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %7
%10 = load i32, i32* %8
%11 = call i32 (i32*, i8*, ...) @BIO_printf(i32* %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%12 = load %struct.TYPE_7__*, %struct.TYPE_7__** %6
%13 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %12, i32 0, i32 1
%14 = load i64, i64* %13
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %22
16: ; preds = %4
%17 = load i32*, i32** %7
%18 = load %struct.TYPE_7__*, %struct.TYPE_7__** %6
%19 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %18, i32 0, i32 1
%20 = load i64, i64* %19
%21 = call i32 @i2a_ASN1_INTEGER(i32* %17, i64 %20)
br label %25
22: ; preds = %4
%23 = load i32*, i32** %7
%24 = call i32 (i32*, i8*, ...) @BIO_printf(i32* %23, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %22, %16
%26 = load i32*, i32** %7
%27 = call i32 @BIO_puts(i32* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%28 = load i32*, i32** %7
%29 = load i32, i32* %8
%30 = call i32 (i32*, i8*, ...) @BIO_printf(i32* %28, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %29, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%31 = load i32*, i32** %7
%32 = load %struct.TYPE_7__*, %struct.TYPE_7__** %6
%33 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %32, i32 0, i32 0
%34 = load %struct.TYPE_6__*, %struct.TYPE_6__** %33
%35 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %34, i32 0, i32 1
%36 = load i32, i32* %35
%37 = call i32 @i2a_ASN1_OBJECT(i32* %31, i32 %36)
%38 = load i32*, i32** %7
%39 = call i32 @BIO_puts(i32* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%40 = load %struct.TYPE_7__*, %struct.TYPE_7__** %6
%41 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %40, i32 0, i32 0
%42 = load %struct.TYPE_6__*, %struct.TYPE_6__** %41
%43 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %42, i32 0, i32 0
%44 = load %struct.TYPE_5__*, %struct.TYPE_5__** %43
%45 = icmp ne %struct.TYPE_5__* %44, null
br i1 %45, label %46, label %66
46: ; preds = %25
%47 = load %struct.TYPE_7__*, %struct.TYPE_7__** %6
%48 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %47, i32 0, i32 0
%49 = load %struct.TYPE_6__*, %struct.TYPE_6__** %48
%50 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %49, i32 0, i32 0
%51 = load %struct.TYPE_5__*, %struct.TYPE_5__** %50
%52 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %51, i32 0, i32 0
%53 = load i64, i64* %52
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %66
55: ; preds = %46
%56 = load i32*, i32** %7
%57 = load i32, i32* %8
%58 = load %struct.TYPE_7__*, %struct.TYPE_7__** %6
%59 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %58, i32 0, i32 0
%60 = load %struct.TYPE_6__*, %struct.TYPE_6__** %59
%61 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %60, i32 0, i32 0
%62 = load %struct.TYPE_5__*, %struct.TYPE_5__** %61
%63 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %62, i32 0, i32 0
%64 = load i64, i64* %63
%65 = call i32 (i32*, i8*, ...) @BIO_printf(i32* %56, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %57, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i64 %64)
br label %66
66: ; preds = %55, %46, %25
ret i32 1
}

LLVM IR (-O2):
%struct.TYPE_7__ = type { %struct.TYPE_6__*, i64 }
%struct.TYPE_6__ = type { %struct.TYPE_5__*, i32 }
%struct.TYPE_5__ = type { i64 }
@.str = [28 x i8] c"%*sPath Length Constraint: \00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [9 x i8] c"infinite\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [21 x i8] c"%*sPolicy Language: \00"
@.str.5 = [20 x i8] c"%*sPolicy Text: %s\0A\00"
define i32 @i2r_pci(i32* nocapture readnone %0, %struct.TYPE_7__* nocapture %1, i32* %2, i32 %3) {
%5 = tail call i32 (i32*, i8*, ...) @BIO_printf(i32* %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %1, i64 0, i32 1
%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 @i2a_ASN1_INTEGER(i32* %2, i64 %7)
br label %13
11: ; preds = %4
%12 = tail call i32 (i32*, i8*, ...) @BIO_printf(i32* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = tail call i32 @BIO_puts(i32* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%15 = tail call i32 (i32*, i8*, ...) @BIO_printf(i32* %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%16 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %1, i64 0, i32 0
%17 = load %struct.TYPE_6__*, %struct.TYPE_6__** %16
%18 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %17, i64 0, i32 1
%19 = load i32, i32* %18
%20 = tail call i32 @i2a_ASN1_OBJECT(i32* %2, i32 %19)
%21 = tail call i32 @BIO_puts(i32* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%22 = load %struct.TYPE_6__*, %struct.TYPE_6__** %16
%23 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %22, i64 0, i32 0
%24 = load %struct.TYPE_5__*, %struct.TYPE_5__** %23
%25 = icmp eq %struct.TYPE_5__* %24, null
br i1 %25, label %32, label %26
26: ; preds = %13
%27 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %24, i64 0, i32 0
%28 = load i64, i64* %27
%29 = icmp eq i64 %28, 0
br i1 %29, label %32, label %30
30: ; preds = %26
%31 = tail call i32 (i32*, i8*, ...) @BIO_printf(i32* %2, i8* getelementptr inbounds ([20 x i8], [20 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), i64 %28)
br label %32
32: ; preds = %30, %26, %13
ret i32 1
}