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

/* Type definitions */
typedef int /*<<< orphan*/ X509V3_EXT_METHOD;
struct TYPE_3__ {
  scalar_t__ notAfter;
  scalar_t__ notBefore;
};
typedef TYPE_1__ PKEY_USAGE_PERIOD;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ ASN1_GENERALIZEDTIME_print(int /*<<< orphan*/ *, scalar_t__);
int /*<<< orphan*/ BIO_printf(int /*<<< orphan*/ *, char *, int, char *);
int /*<<< orphan*/ BIO_write(int /*<<< orphan*/ *, char *, int);
int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, PKEY_USAGE_PERIOD *usage,
                          BIO *out, int indent) {
  BIO_printf(out, "%*s", indent, "");
  if (usage->notBefore) {
    BIO_write(out, "Not Before: ", 12);
    ASN1_GENERALIZEDTIME_print(out, usage->notBefore);
    if (usage->notAfter)
      BIO_write(out, ", ", 2);
  }
  if (usage->notAfter) {
    BIO_write(out, "Not After: ", 11);
    ASN1_GENERALIZEDTIME_print(out, usage->notAfter);
  }
  return 1;
}


x86 assembly (clang, -O0):
<i2r_PKEY_USAGE_PERIOD>:
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    0xeab(%rip),%rsi
lea    0xeb7(%rip),%rcx
call   1030 <BIO_printf@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     11be <i2r_PKEY_USAGE_PERIOD+0x8e>
mov    -0x18(%rbp),%rdi
lea    0xe89(%rip),%rsi
mov    $0xc,%edx
call   1050 <BIO_write@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1040 <ASN1_GENERALIZEDTIME_print@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     11b9 <i2r_PKEY_USAGE_PERIOD+0x89>
mov    -0x18(%rbp),%rdi
lea    0xe62(%rip),%rsi
mov    $0x2,%edx
call   1050 <BIO_write@plt>
jmp    11be <i2r_PKEY_USAGE_PERIOD+0x8e>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     11f1 <i2r_PKEY_USAGE_PERIOD+0xc1>
mov    -0x18(%rbp),%rdi
lea    0xe3d(%rip),%rsi
mov    $0xb,%edx
call   1050 <BIO_write@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1040 <ASN1_GENERALIZEDTIME_print@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2r_PKEY_USAGE_PERIOD>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0xebf(%rip),%rsi
lea    0xecb(%rip),%rax
mov    %rdx,%rdi
mov    %ecx,%edx
mov    %rax,%rcx
call   1030 <BIO_printf@plt>
cmpq   $0x0,0x8(%rbx)
je     1196 <i2r_PKEY_USAGE_PERIOD+0x66>
lea    0xea1(%rip),%rsi
mov    %r14,%rdi
mov    $0xc,%edx
call   1050 <BIO_write@plt>
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1040 <ASN1_GENERALIZEDTIME_print@plt>
cmpq   $0x0,(%rbx)
je     1196 <i2r_PKEY_USAGE_PERIOD+0x66>
lea    0xe88(%rip),%rsi
mov    %r14,%rdi
mov    $0x2,%edx
call   1050 <BIO_write@plt>
cmpq   $0x0,(%rbx)
je     11bb <i2r_PKEY_USAGE_PERIOD+0x8b>
lea    0xe71(%rip),%rsi
mov    %r14,%rdi
mov    $0xb,%edx
call   1050 <BIO_write@plt>
mov    (%rbx),%rsi
mov    %r14,%rdi
call   1040 <ASN1_GENERALIZEDTIME_print@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
@.str = [4 x i8] c"%*s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [13 x i8] c"Not Before: \00"
@.str.3 = [3 x i8] c", \00"
@.str.4 = [12 x i8] c"Not After: \00"
define i32 @i2r_PKEY_USAGE_PERIOD(i32* %0, %struct.TYPE_3__* %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca %struct.TYPE_3__*
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %7
%10 = load i32, i32* %8
%11 = call i32 @BIO_printf(i32* %9, i8* getelementptr inbounds ([4 x i8], [4 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_3__*, %struct.TYPE_3__** %6
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %12, i32 0, i32 1
%14 = load i64, i64* %13
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %32
16: ; preds = %4
%17 = load i32*, i32** %7
%18 = call i32 @BIO_write(i32* %17, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 12)
%19 = load i32*, i32** %7
%20 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%21 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %20, i32 0, i32 1
%22 = load i64, i64* %21
%23 = call i32 @ASN1_GENERALIZEDTIME_print(i32* %19, i64 %22)
%24 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%25 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %24, i32 0, i32 0
%26 = load i64, i64* %25
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %16
%29 = load i32*, i32** %7
%30 = call i32 @BIO_write(i32* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
br label %31
31: ; preds = %28, %16
br label %32
32: ; preds = %31, %4
%33 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%34 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %33, i32 0, i32 0
%35 = load i64, i64* %34
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %45
37: ; preds = %32
%38 = load i32*, i32** %7
%39 = call i32 @BIO_write(i32* %38, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 11)
%40 = load i32*, i32** %7
%41 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%42 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %41, i32 0, i32 0
%43 = load i64, i64* %42
%44 = call i32 @ASN1_GENERALIZEDTIME_print(i32* %40, i64 %43)
br label %45
45: ; preds = %37, %32
ret i32 1
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64, i64 }
@.str = [4 x i8] c"%*s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [13 x i8] c"Not Before: \00"
@.str.3 = [3 x i8] c", \00"
@.str.4 = [12 x i8] c"Not After: \00"
define i32 @i2r_PKEY_USAGE_PERIOD(i32* nocapture readnone %0, %struct.TYPE_3__* nocapture %1, i32* %2, i32 %3) {
%5 = tail call i32 @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 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %4
%10 = tail call i32 @BIO_write(i32* %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 12)
%11 = load i64, i64* %6
%12 = tail call i32 @ASN1_GENERALIZEDTIME_print(i32* %2, i64 %11)
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%14 = load i64, i64* %13
%15 = icmp eq i64 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %9
%17 = tail call i32 @BIO_write(i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
br label %18
18: ; preds = %9, %16, %4
%19 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%20 = load i64, i64* %19
%21 = icmp eq i64 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = tail call i32 @BIO_write(i32* %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 11)
%24 = load i64, i64* %19
%25 = tail call i32 @ASN1_GENERALIZEDTIME_print(i32* %2, i64 %24)
br label %26
26: ; preds = %22, %18
ret i32 1
}