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

/* Variables and functions */
int /*<<< orphan*/ CONF_modules_load(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                     int /*<<< orphan*/);
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int /*<<< orphan*/ printf(char *);
int main(int arc, char *argv[]) {
  ERR_load_crypto_strings();
  OpenSSL_add_all_algorithms();
  CONF_modules_load(NULL, NULL, 0);
  printf("OpenSSL successfully initialized.\n");
  EVP_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_free_strings();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1090 <ERR_load_crypto_strings@plt>
mov    $0x0,%al
call   1060 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
mov    %rsi,%rdi
call   1030 <CONF_modules_load@plt>
lea    0xe57(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <EVP_cleanup@plt>
mov    $0x0,%al
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
mov    $0x0,%al
call   1080 <ERR_free_strings@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1090 <ERR_load_crypto_strings@plt>
xor    %eax,%eax
call   1060 <OpenSSL_add_all_algorithms@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <CONF_modules_load@plt>
lea    0xe6f(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1070 <EVP_cleanup@plt>
xor    %eax,%eax
call   1050 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
call   1080 <ERR_free_strings@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"OpenSSL successfully initialized.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @ERR_load_crypto_strings()
%7 = call i32 (...) @OpenSSL_add_all_algorithms()
%8 = call i32 @CONF_modules_load(i32* null, i32* null, i32 0)
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @EVP_cleanup()
%11 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%12 = call i32 (...) @ERR_free_strings()
ret i32 0
}

LLVM IR (-O2):
@str = [34 x i8] c"OpenSSL successfully initialized.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ERR_load_crypto_strings()
%4 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%5 = tail call i32 @CONF_modules_load(i32* null, i32* null, i32 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 (...) @EVP_cleanup()
%8 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
%9 = tail call i32 (...) @ERR_free_strings()
ret i32 0
}