#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_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_library_init();
int /*<<< orphan*/ SSL_load_error_strings();
int /*<<< orphan*/ TLSv1_server_method();
int /*<<< orphan*/ abort();
int /*<<< orphan*/ stderr;
SSL_CTX *InitServerCTX(void) {
  SSL_CTX *ctx;
  SSL_library_init();
  OpenSSL_add_all_algorithms();
  SSL_load_error_strings();
  ctx = SSL_CTX_new(TLSv1_server_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   1040 <SSL_library_init@plt>
mov    $0x0,%al
call   1050 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   1070 <SSL_load_error_strings@plt>
mov    $0x0,%al
call   1080 <TLSv1_server_method@plt>
mov    %eax,%edi
call   1060 <SSL_CTX_new@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    11bf <InitServerCTX+0x4f>
mov    0x2e2f(%rip),%rax
mov    (%rax),%edi
call   1090 <ERR_print_errors_fp@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitServerCTX>:
push   %rax
xor    %eax,%eax
call   1040 <SSL_library_init@plt>
xor    %eax,%eax
call   1050 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
call   1070 <SSL_load_error_strings@plt>
xor    %eax,%eax
call   1080 <TLSv1_server_method@plt>
mov    %eax,%edi
call   1060 <SSL_CTX_new@plt>
test   %rax,%rax
je     119b <InitServerCTX+0x2b>
pop    %rcx
ret
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
call   1090 <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 = call i32 (...) @SSL_library_init()
%3 = call i32 (...) @OpenSSL_add_all_algorithms()
%4 = call i32 (...) @SSL_load_error_strings()
%5 = call i32 (...) @TLSv1_server_method()
%6 = call i32* @SSL_CTX_new(i32 %5)
store i32* %6, i32** %1
%7 = load i32*, i32** %1
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = load i32, i32* @stderr
%11 = call i32 @ERR_print_errors_fp(i32 %10)
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %0
%14 = load i32*, i32** %1
ret i32* %14
}

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