#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*/ SSL_METHOD;
typedef int /*<<< orphan*/ SSL_CTX;

/* Variables and functions */
int /*<<< orphan*/ ERR_print_errors_fp(int /*<<< orphan*/);
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int /*<<< orphan*/ *SSL_CTX_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ SSL_load_error_strings();
int /*<<< orphan*/ *SSLv2_server_method();
int /*<<< orphan*/ abort();
int /*<<< orphan*/ stderr;
SSL_CTX *InitServerCTX(void) {
  SSL_METHOD *method;
  SSL_CTX *ctx;
  OpenSSL_add_all_algorithms();
  SSL_load_error_strings();
  method = SSLv2_server_method();
  ctx = SSL_CTX_new(method);
  if (ctx == NULL) {
    ERR_print_errors_fp(stderr);
    abort();
  }
  return ctx;
}


x86 assembly (clang, -O0):
<InitServerCTX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   1070 <SSL_load_error_strings@plt>
mov    $0x0,%al
call   1040 <SSLv2_server_method@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <SSL_CTX_new@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11ae <InitServerCTX+0x4e>
mov    0x2e40(%rip),%rax
mov    (%rax),%edi
call   1080 <ERR_print_errors_fp@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitServerCTX>:
push   %rax
xor    %eax,%eax
call   1050 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
call   1070 <SSL_load_error_strings@plt>
xor    %eax,%eax
call   1040 <SSLv2_server_method@plt>
mov    %rax,%rdi
call   1060 <SSL_CTX_new@plt>
test   %rax,%rax
je     1185 <InitServerCTX+0x25>
pop    %rcx
ret
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
call   1080 <ERR_print_errors_fp@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
define i32* @InitServerCTX() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i32 (...) @OpenSSL_add_all_algorithms()
%4 = call i32 (...) @SSL_load_error_strings()
%5 = call i32* (...) @SSLv2_server_method()
store i32* %5, i32** %1
%6 = load i32*, i32** %1
%7 = call i32* @SSL_CTX_new(i32* %6)
store i32* %7, i32** %2
%8 = load i32*, i32** %2
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %14
10: ; preds = %0
%11 = load i32, i32* @stderr
%12 = call i32 @ERR_print_errors_fp(i32 %11)
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %0
%15 = load i32*, i32** %2
ret i32* %15
}

LLVM IR (-O2):
@stderr = global i32 0
define i32* @InitServerCTX() {
%1 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%2 = tail call i32 (...) @SSL_load_error_strings()
%3 = tail call i32* (...) @SSLv2_server_method()
%4 = tail call i32* @SSL_CTX_new(i32* %3)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = tail call i32 @ERR_print_errors_fp(i32 %7)
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %0
ret i32* %4
}