#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 *);
int /*<<< orphan*/ V_ASN1_OCTET_STRING;
scalar_t__ i2a_ASN1_STRING(int /*<<< orphan*/ *, void *, int /*<<< orphan*/);
int i2r_ocsp_nonce(const X509V3_EXT_METHOD *method, void *nonce, BIO *out,
                   int indent) {
  if (BIO_printf(out, "%*s", indent, "") <= 0)
    return 0;
  if (i2a_ASN1_STRING(out, nonce, V_ASN1_OCTET_STRING) <= 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<i2r_ocsp_nonce>:
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   1030 <BIO_printf@plt>
cmp    $0x0,%rax
jg     1167 <i2r_ocsp_nonce+0x47>
movl   $0x0,-0x4(%rbp)
jmp    119a <i2r_ocsp_nonce+0x7a>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2e6a(%rip),%rax
mov    (%rax),%edx
call   1040 <i2a_ASN1_STRING@plt>
cmp    $0x0,%rax
jg     1193 <i2r_ocsp_nonce+0x73>
movl   $0x0,-0x4(%rbp)
jmp    119a <i2r_ocsp_nonce+0x7a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2r_ocsp_nonce>:
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   1030 <BIO_printf@plt>
test   %rax,%rax
jle    116b <i2r_ocsp_nonce+0x4b>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <i2a_ASN1_STRING@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setg   %al
jmp    116d <i2r_ocsp_nonce+0x4d>
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
@V_ASN1_OCTET_STRING = global i32 0
define i32 @i2r_ocsp_nonce(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 %23
15: ; preds = %4
%16 = load i32*, i32** %8
%17 = load i8*, i8** %7
%18 = load i32, i32* @V_ASN1_OCTET_STRING
%19 = call i64 @i2a_ASN1_STRING(i32* %16, i8* %17, i32 %18)
%20 = icmp sle i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %15
store i32 0, i32* %5
br label %23
22: ; preds = %15
store i32 1, i32* %5
br label %23
23: ; preds = %22, %21, %14
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*s\00"
@.str.1 = [1 x i8] zeroinitializer
@V_ASN1_OCTET_STRING = global i32 0
define i32 @i2r_ocsp_nonce(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 %12, label %7
7: ; preds = %4
%8 = load i32, i32* @V_ASN1_OCTET_STRING
%9 = tail call i64 @i2a_ASN1_STRING(i32* %2, i8* %1, i32 %8)
%10 = icmp sgt i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %7, %4
%13 = phi i32 [ 0, %4 ], [ %11, %7 ]
ret i32 %13
}