#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__ {
  int /*<<< orphan*/ excludedSubtrees;
  int /*<<< orphan*/ permittedSubtrees;
};
typedef TYPE_1__ NAME_CONSTRAINTS;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ do_i2r_name_constraints(int /*<<< orphan*/ const *,
                                           int /*<<< orphan*/,
                                           int /*<<< orphan*/ *, int, char *);
int i2r_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method, void *a, BIO *bp,
                         int ind) {
  NAME_CONSTRAINTS *ncons = a;
  do_i2r_name_constraints(method, ncons->permittedSubtrees, bp, ind,
                          "Permitted");
  do_i2r_name_constraints(method, ncons->excludedSubtrees, bp, ind, "Excluded");
  return 1;
}


x86 assembly (clang, -O0):
<i2r_NAME_CONSTRAINTS>:
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    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xeb8(%rip),%r8
call   1030 <do_i2r_name_constraints@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xea5(%rip),%r8
call   1030 <do_i2r_name_constraints@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2r_NAME_CONSTRAINTS>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    0x4(%rsi),%esi
lea    0xed3(%rip),%r8
call   1030 <do_i2r_name_constraints@plt>
mov    0x0(%rbp),%esi
lea    0xece(%rip),%r8
mov    %rbx,%rdi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1030 <do_i2r_name_constraints@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32, i32 }
@.str = [10 x i8] c"Permitted\00"
@.str.1 = [9 x i8] c"Excluded\00"
define i32 @i2r_NAME_CONSTRAINTS(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 i32*, i32** %5
%13 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%14 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %13, i32 0, i32 1
%15 = load i32, i32* %14
%16 = load i32*, i32** %7
%17 = load i32, i32* %8
%18 = call i32 @do_i2r_name_constraints(i32* %12, i32 %15, i32* %16, i32 %17, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%19 = load i32*, i32** %5
%20 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%21 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = load i32*, i32** %7
%24 = load i32, i32* %8
%25 = call i32 @do_i2r_name_constraints(i32* %19, i32 %22, i32* %23, i32 %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [10 x i8] c"Permitted\00"
@.str.1 = [9 x i8] c"Excluded\00"
define i32 @i2r_NAME_CONSTRAINTS(i32* %0, i8* nocapture %1, i32* %2, i32 %3) {
%5 = getelementptr inbounds i8, i8* %1, i64 4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = tail call i32 @do_i2r_name_constraints(i32* %0, i32 %7, i32* %2, i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%9 = bitcast i8* %1 to i32*
%10 = load i32, i32* %9
%11 = tail call i32 @do_i2r_name_constraints(i32* %0, i32 %10, i32* %2, i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}