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

/* Variables and functions */
int /*<<< orphan*/ ENGINE_add(int /*<<< orphan*/ *);
int /*<<< orphan*/ ENGINE_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ ERR_clear_error();
int /*<<< orphan*/ *engine_jksengine();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void ENGINE_load_jksengine(void) {
  ENGINE *e;
  ;
  e = engine_jksengine();
  if (!e) {
    fprintf(stderr, "ERROR: No Engine Object created\n");
    ;
    return;
  } else {
    ENGINE_add(e);
    ENGINE_free(e);
    ERR_clear_error();
  }
}


x86 assembly (clang, -O0):
<ENGINE_load_jksengine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <engine_jksengine@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1188 <ENGINE_load_jksengine+0x38>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
lea    0xe82(%rip),%rsi
call   1050 <fprintf@plt>
jmp    11a1 <ENGINE_load_jksengine+0x51>
mov    -0x8(%rbp),%rdi
call   1040 <ENGINE_add@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ENGINE_free@plt>
mov    $0x0,%al
call   1060 <ERR_clear_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ENGINE_load_jksengine>:
push   %rbx
xor    %eax,%eax
call   1070 <engine_jksengine@plt>
test   %rax,%rax
je     1178 <ENGINE_load_jksengine+0x28>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <ENGINE_add@plt>
mov    %rbx,%rdi
call   1030 <ENGINE_free@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <ERR_clear_error@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
lea    0xe78(%rip),%rsi
pop    %rbx
jmp    1050 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"ERROR: No Engine Object created\0A\00"
define void @ENGINE_load_jksengine() {
%1 = alloca i32*
%2 = call i32* (...) @engine_jksengine()
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %14
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = call i32 @ENGINE_add(i32* %9)
%11 = load i32*, i32** %1
%12 = call i32 @ENGINE_free(i32* %11)
%13 = call i32 (...) @ERR_clear_error()
br label %14
14: ; preds = %5, %8
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"ERROR: No Engine Object created\0A\00"
define void @ENGINE_load_jksengine() {
%1 = tail call i32* (...) @engine_jksengine()
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %10
6: ; preds = %0
%7 = tail call i32 @ENGINE_add(i32* %1)
%8 = tail call i32 @ENGINE_free(i32* %1)
%9 = tail call i32 (...) @ERR_clear_error()
br label %10
10: ; preds = %6, %3
ret void
}