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

/* Variables and functions */
int /*<<< orphan*/ BIO_NOCLOSE;
int /*<<< orphan*/ BIO_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BIO_new_fp(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ CONF_modules_free();
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ENGINE_cleanup();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ ERR_remove_state(int /*<<< orphan*/);
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ *SSL_CTX_new(int /*<<< orphan*/ const *);
int /*<<< orphan*/ SSL_library_init();
int /*<<< orphan*/ SSL_load_error_strings();
int /*<<< orphan*/ *SSLv23_method();
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  BIO *bio_err = NULL;
  SSL_library_init();
  SSL_load_error_strings();
  ERR_load_crypto_strings();
  bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
  const SSL_METHOD *meth = SSLv23_method();
  SSL_CTX *ctx = SSL_CTX_new(meth);
  BIO_free(bio_err);
  ERR_free_strings();
  ERR_remove_state(0);
  ENGINE_cleanup();
  CONF_modules_free();
  EVP_cleanup();
  CRYPTO_cleanup_all_ex_data();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0x0,%al
call   1080 <SSL_library_init@plt>
mov    $0x0,%al
call   10e0 <SSL_load_error_strings@plt>
mov    $0x0,%al
call   10f0 <ERR_load_crypto_strings@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
mov    0x2dd5(%rip),%rax
mov    (%rax),%esi
call   1030 <BIO_new_fp@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <SSLv23_method@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   10b0 <SSL_CTX_new@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   10d0 <BIO_free@plt>
mov    $0x0,%al
call   10a0 <ERR_free_strings@plt>
xor    %edi,%edi
call   1040 <ERR_remove_state@plt>
mov    $0x0,%al
call   1070 <ENGINE_cleanup@plt>
mov    $0x0,%al
call   10c0 <CONF_modules_free@plt>
mov    $0x0,%al
call   1090 <EVP_cleanup@plt>
mov    $0x0,%al
call   1060 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1080 <SSL_library_init@plt>
xor    %eax,%eax
call   10e0 <SSL_load_error_strings@plt>
xor    %eax,%eax
call   10f0 <ERR_load_crypto_strings@plt>
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
mov    0x2df2(%rip),%rax
mov    (%rax),%esi
call   1030 <BIO_new_fp@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <SSLv23_method@plt>
mov    %rax,%rdi
call   10b0 <SSL_CTX_new@plt>
mov    %rbx,%rdi
call   10d0 <BIO_free@plt>
xor    %eax,%eax
call   10a0 <ERR_free_strings@plt>
xor    %edi,%edi
call   1040 <ERR_remove_state@plt>
xor    %eax,%eax
call   1070 <ENGINE_cleanup@plt>
xor    %eax,%eax
call   10c0 <CONF_modules_free@plt>
xor    %eax,%eax
call   1090 <EVP_cleanup@plt>
xor    %eax,%eax
call   1060 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@BIO_NOCLOSE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
%9 = call i32 (...) @SSL_library_init()
%10 = call i32 (...) @SSL_load_error_strings()
%11 = call i32 (...) @ERR_load_crypto_strings()
%12 = load i32, i32* @stderr
%13 = load i32, i32* @BIO_NOCLOSE
%14 = call i32* @BIO_new_fp(i32 %12, i32 %13)
store i32* %14, i32** %6
%15 = call i32* (...) @SSLv23_method()
store i32* %15, i32** %7
%16 = load i32*, i32** %7
%17 = call i32* @SSL_CTX_new(i32* %16)
store i32* %17, i32** %8
%18 = load i32*, i32** %6
%19 = call i32 @BIO_free(i32* %18)
%20 = call i32 (...) @ERR_free_strings()
%21 = call i32 @ERR_remove_state(i32 0)
%22 = call i32 (...) @ENGINE_cleanup()
%23 = call i32 (...) @CONF_modules_free()
%24 = call i32 (...) @EVP_cleanup()
%25 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@BIO_NOCLOSE = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @SSL_library_init()
%4 = tail call i32 (...) @SSL_load_error_strings()
%5 = tail call i32 (...) @ERR_load_crypto_strings()
%6 = load i32, i32* @stderr
%7 = load i32, i32* @BIO_NOCLOSE
%8 = tail call i32* @BIO_new_fp(i32 %6, i32 %7)
%9 = tail call i32* (...) @SSLv23_method()
%10 = tail call i32* @SSL_CTX_new(i32* %9)
%11 = tail call i32 @BIO_free(i32* %8)
%12 = tail call i32 (...) @ERR_free_strings()
%13 = tail call i32 @ERR_remove_state(i32 0)
%14 = tail call i32 (...) @ENGINE_cleanup()
%15 = tail call i32 (...) @CONF_modules_free()
%16 = tail call i32 (...) @EVP_cleanup()
%17 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
ret i32 0
}