#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 */

/* Type definitions */
typedef int /*<<< orphan*/ X509V3_EXT_METHOD;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
scalar_t__ BIO_printf(int /*<<< orphan*/ *, char *, int, char *);
scalar_t__ i2a_ASN1_OBJECT(int /*<<< orphan*/ *, void *);
int i2r_object(const X509V3_EXT_METHOD *method, void *oid, BIO *bp, int ind) {
  if (BIO_printf(bp, "%*s", ind, "") <= 0)
    return 0;
  if (i2a_ASN1_OBJECT(bp, oid) <= 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<i2r_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0xebb(%rip),%rsi
lea    0xeb7(%rip),%rcx
call   1040 <BIO_printf@plt>
cmp    $0x0,%rax
jg     1167 <i2r_object+0x47>
movl   $0x0,-0x4(%rbp)
jmp    1191 <i2r_object+0x71>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <i2a_ASN1_OBJECT@plt>
cmp    $0x0,%rax
jg     118a <i2r_object+0x6a>
movl   $0x0,-0x4(%rbp)
jmp    1191 <i2r_object+0x71>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2r_object>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
lea    0xecf(%rip),%rsi
lea    0xecb(%rip),%rax
mov    %rdx,%rdi
mov    %ecx,%edx
mov    %rax,%rcx
call   1040 <BIO_printf@plt>
test   %rax,%rax
jle    1162 <i2r_object+0x42>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <i2a_ASN1_OBJECT@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setg   %al
jmp    1164 <i2r_object+0x44>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%*s\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @i2r_object(i32* %0, i8* %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32
store i32* %0, i32** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
%10 = load i32*, i32** %8
%11 = load i32, i32* %9
%12 = call i64 @BIO_printf(i32* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp sle i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %4
store i32 0, i32* %5
br label %22
15: ; preds = %4
%16 = load i32*, i32** %8
%17 = load i8*, i8** %7
%18 = call i64 @i2a_ASN1_OBJECT(i32* %16, i8* %17)
%19 = icmp sle i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %15
store i32 0, i32* %5
br label %22
21: ; preds = %15
store i32 1, i32* %5
br label %22
22: ; preds = %21, %20, %14
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*s\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @i2r_object(i32* nocapture readnone %0, i8* %1, i32* %2, i32 %3) {
%5 = tail call i64 @BIO_printf(i32* %2, i8* getelementptr inbounds ([4 x i8], [4 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 = icmp slt i64 %5, 1
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i64 @i2a_ASN1_OBJECT(i32* %2, i8* %1)
%9 = icmp sgt i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 0, %4 ], [ %10, %7 ]
ret i32 %12
}