#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*/ EVP_add_digest(int /*<<< orphan*/);
int /*<<< orphan*/ EVP_add_digest_alias(int /*<<< orphan*/, char *);
int /*<<< orphan*/ EVP_dss();
int /*<<< orphan*/ EVP_dss1();
int /*<<< orphan*/ EVP_ecdsa();
int /*<<< orphan*/ EVP_gost2814789imit();
int /*<<< orphan*/ EVP_gostr341194();
int /*<<< orphan*/ EVP_md4();
int /*<<< orphan*/ EVP_md5();
int /*<<< orphan*/ EVP_md5_sha1();
int /*<<< orphan*/ EVP_ripemd160();
int /*<<< orphan*/ EVP_sha1();
int /*<<< orphan*/ EVP_sha224();
int /*<<< orphan*/ EVP_sha256();
int /*<<< orphan*/ EVP_sha384();
int /*<<< orphan*/ EVP_sha512();
int /*<<< orphan*/ EVP_streebog256();
int /*<<< orphan*/ EVP_streebog512();
int /*<<< orphan*/ EVP_whirlpool();
int /*<<< orphan*/ SN_dsaWithSHA1;
char *SN_dsaWithSHA1_2;
int /*<<< orphan*/ SN_md5;
int /*<<< orphan*/ SN_ripemd160;
int /*<<< orphan*/ SN_sha1;
char *SN_sha1WithRSA;
int /*<<< orphan*/ SN_sha1WithRSAEncryption;
void OpenSSL_add_all_digests_internal(void) {
  EVP_add_digest(EVP_md4());
  EVP_add_digest(EVP_md5());
  EVP_add_digest(EVP_md5_sha1());
  EVP_add_digest_alias(SN_md5, "ssl2-md5");
  EVP_add_digest_alias(SN_md5, "ssl3-md5");
  EVP_add_digest(EVP_dss());
  EVP_add_digest(EVP_sha1());
  EVP_add_digest_alias(SN_sha1, "ssl3-sha1");
  EVP_add_digest_alias(SN_sha1WithRSAEncryption, SN_sha1WithRSA);
  EVP_add_digest(EVP_dss1());
  EVP_add_digest_alias(SN_dsaWithSHA1, SN_dsaWithSHA1_2);
  EVP_add_digest_alias(SN_dsaWithSHA1, "DSS1");
  EVP_add_digest_alias(SN_dsaWithSHA1, "dss1");
  EVP_add_digest(EVP_ecdsa());
  EVP_add_digest(EVP_gostr341194());
  EVP_add_digest(EVP_gost2814789imit());
  EVP_add_digest(EVP_streebog256());
  EVP_add_digest(EVP_streebog512());
  EVP_add_digest(EVP_ripemd160());
  EVP_add_digest_alias(SN_ripemd160, "ripemd");
  EVP_add_digest_alias(SN_ripemd160, "rmd160");
  EVP_add_digest(EVP_sha224());
  EVP_add_digest(EVP_sha256());
  EVP_add_digest(EVP_sha384());
  EVP_add_digest(EVP_sha512());
  EVP_add_digest(EVP_whirlpool());
}


x86 assembly (clang, -O0):
<OpenSSL_add_all_digests_internal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   10e0 <EVP_md4@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   1030 <EVP_md5@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   1080 <EVP_md5_sha1@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    0x2d53(%rip),%rax
mov    (%rax),%edi
lea    0xd92(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    0x2d3e(%rip),%rax
mov    (%rax),%edi
lea    0xd86(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    $0x0,%al
call   10d0 <EVP_dss@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   1070 <EVP_sha1@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    0x2d05(%rip),%rax
mov    (%rax),%edi
lea    0xd5e(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    0x2d08(%rip),%rax
mov    (%rax),%edi
mov    0x2d1f(%rip),%rax
mov    (%rax),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    $0x0,%al
call   1150 <EVP_dss1@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    0x2cda(%rip),%rax
mov    (%rax),%edi
mov    0x2d09(%rip),%rax
mov    (%rax),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    0x2cc2(%rip),%rax
mov    (%rax),%edi
lea    0xd15(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    0x2cad(%rip),%rax
mov    (%rax),%edi
lea    0xd05(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    $0x0,%al
call   10a0 <EVP_ecdsa@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   10c0 <EVP_gostr341194@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   10b0 <EVP_gost2814789imit@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   1130 <EVP_streebog256@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   1060 <EVP_streebog512@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   10f0 <EVP_ripemd160@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    0x2c64(%rip),%rax
mov    (%rax),%edi
lea    0xca1(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    0x2c4f(%rip),%rax
mov    (%rax),%edi
lea    0xc93(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    $0x0,%al
call   1040 <EVP_sha224@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   1140 <EVP_sha256@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   1100 <EVP_sha384@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   1050 <EVP_sha512@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    $0x0,%al
call   1110 <EVP_whirlpool@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpenSSL_add_all_digests_internal>:
push   %rbx
xor    %eax,%eax
call   10e0 <EVP_md4@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   1030 <EVP_md5@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   1080 <EVP_md5_sha1@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    0x2d56(%rip),%rbx
mov    (%rbx),%edi
lea    0xd95(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    (%rbx),%edi
lea    0xd90(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
xor    %eax,%eax
call   10d0 <EVP_dss@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   1070 <EVP_sha1@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    0x2d0f(%rip),%rax
mov    (%rax),%edi
lea    0xd68(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    0x2d12(%rip),%rax
mov    (%rax),%edi
mov    0x2d29(%rip),%rax
mov    (%rax),%rsi
call   1120 <EVP_add_digest_alias@plt>
xor    %eax,%eax
call   1150 <EVP_dss1@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    0x2ce4(%rip),%rbx
mov    (%rbx),%edi
mov    0x2d13(%rip),%rax
mov    (%rax),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    (%rbx),%edi
lea    0xd26(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    (%rbx),%edi
lea    0xd1d(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
xor    %eax,%eax
call   10a0 <EVP_ecdsa@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   10c0 <EVP_gostr341194@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   10b0 <EVP_gost2814789imit@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   1130 <EVP_streebog256@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   1060 <EVP_streebog512@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   10f0 <EVP_ripemd160@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
mov    0x2c7c(%rip),%rbx
mov    (%rbx),%edi
lea    0xcb9(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
mov    (%rbx),%edi
lea    0xcb2(%rip),%rsi
call   1120 <EVP_add_digest_alias@plt>
xor    %eax,%eax
call   1040 <EVP_sha224@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   1140 <EVP_sha256@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   1100 <EVP_sha384@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   1050 <EVP_sha512@plt>
mov    %eax,%edi
call   1090 <EVP_add_digest@plt>
xor    %eax,%eax
call   1110 <EVP_whirlpool@plt>
mov    %eax,%edi
pop    %rbx
jmp    1090 <EVP_add_digest@plt>

LLVM IR (-O0):
@SN_md5 = global i32 0
@.str = [9 x i8] c"ssl2-md5\00"
@.str.1 = [9 x i8] c"ssl3-md5\00"
@SN_sha1 = global i32 0
@.str.2 = [10 x i8] c"ssl3-sha1\00"
@SN_sha1WithRSAEncryption = global i32 0
@SN_sha1WithRSA = global i8* null
@SN_dsaWithSHA1 = global i32 0
@SN_dsaWithSHA1_2 = global i8* null
@.str.3 = [5 x i8] c"DSS1\00"
@.str.4 = [5 x i8] c"dss1\00"
@SN_ripemd160 = global i32 0
@.str.5 = [7 x i8] c"ripemd\00"
@.str.6 = [7 x i8] c"rmd160\00"
define void @OpenSSL_add_all_digests_internal() {
%1 = call i32 (...) @EVP_md4()
%2 = call i32 @EVP_add_digest(i32 %1)
%3 = call i32 (...) @EVP_md5()
%4 = call i32 @EVP_add_digest(i32 %3)
%5 = call i32 (...) @EVP_md5_sha1()
%6 = call i32 @EVP_add_digest(i32 %5)
%7 = load i32, i32* @SN_md5
%8 = call i32 @EVP_add_digest_alias(i32 %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @SN_md5
%10 = call i32 @EVP_add_digest_alias(i32 %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (...) @EVP_dss()
%12 = call i32 @EVP_add_digest(i32 %11)
%13 = call i32 (...) @EVP_sha1()
%14 = call i32 @EVP_add_digest(i32 %13)
%15 = load i32, i32* @SN_sha1
%16 = call i32 @EVP_add_digest_alias(i32 %15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @SN_sha1WithRSAEncryption
%18 = load i8*, i8** @SN_sha1WithRSA
%19 = call i32 @EVP_add_digest_alias(i32 %17, i8* %18)
%20 = call i32 (...) @EVP_dss1()
%21 = call i32 @EVP_add_digest(i32 %20)
%22 = load i32, i32* @SN_dsaWithSHA1
%23 = load i8*, i8** @SN_dsaWithSHA1_2
%24 = call i32 @EVP_add_digest_alias(i32 %22, i8* %23)
%25 = load i32, i32* @SN_dsaWithSHA1
%26 = call i32 @EVP_add_digest_alias(i32 %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%27 = load i32, i32* @SN_dsaWithSHA1
%28 = call i32 @EVP_add_digest_alias(i32 %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%29 = call i32 (...) @EVP_ecdsa()
%30 = call i32 @EVP_add_digest(i32 %29)
%31 = call i32 (...) @EVP_gostr341194()
%32 = call i32 @EVP_add_digest(i32 %31)
%33 = call i32 (...) @EVP_gost2814789imit()
%34 = call i32 @EVP_add_digest(i32 %33)
%35 = call i32 (...) @EVP_streebog256()
%36 = call i32 @EVP_add_digest(i32 %35)
%37 = call i32 (...) @EVP_streebog512()
%38 = call i32 @EVP_add_digest(i32 %37)
%39 = call i32 (...) @EVP_ripemd160()
%40 = call i32 @EVP_add_digest(i32 %39)
%41 = load i32, i32* @SN_ripemd160
%42 = call i32 @EVP_add_digest_alias(i32 %41, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%43 = load i32, i32* @SN_ripemd160
%44 = call i32 @EVP_add_digest_alias(i32 %43, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%45 = call i32 (...) @EVP_sha224()
%46 = call i32 @EVP_add_digest(i32 %45)
%47 = call i32 (...) @EVP_sha256()
%48 = call i32 @EVP_add_digest(i32 %47)
%49 = call i32 (...) @EVP_sha384()
%50 = call i32 @EVP_add_digest(i32 %49)
%51 = call i32 (...) @EVP_sha512()
%52 = call i32 @EVP_add_digest(i32 %51)
%53 = call i32 (...) @EVP_whirlpool()
%54 = call i32 @EVP_add_digest(i32 %53)
ret void
}

LLVM IR (-O2):
@SN_md5 = global i32 0
@.str = [9 x i8] c"ssl2-md5\00"
@.str.1 = [9 x i8] c"ssl3-md5\00"
@SN_sha1 = global i32 0
@.str.2 = [10 x i8] c"ssl3-sha1\00"
@SN_sha1WithRSAEncryption = global i32 0
@SN_sha1WithRSA = global i8* null
@SN_dsaWithSHA1 = global i32 0
@SN_dsaWithSHA1_2 = global i8* null
@.str.3 = [5 x i8] c"DSS1\00"
@.str.4 = [5 x i8] c"dss1\00"
@SN_ripemd160 = global i32 0
@.str.5 = [7 x i8] c"ripemd\00"
@.str.6 = [7 x i8] c"rmd160\00"
define void @OpenSSL_add_all_digests_internal() {
%1 = tail call i32 (...) @EVP_md4()
%2 = tail call i32 @EVP_add_digest(i32 %1)
%3 = tail call i32 (...) @EVP_md5()
%4 = tail call i32 @EVP_add_digest(i32 %3)
%5 = tail call i32 (...) @EVP_md5_sha1()
%6 = tail call i32 @EVP_add_digest(i32 %5)
%7 = load i32, i32* @SN_md5
%8 = tail call i32 @EVP_add_digest_alias(i32 %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @SN_md5
%10 = tail call i32 @EVP_add_digest_alias(i32 %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 (...) @EVP_dss()
%12 = tail call i32 @EVP_add_digest(i32 %11)
%13 = tail call i32 (...) @EVP_sha1()
%14 = tail call i32 @EVP_add_digest(i32 %13)
%15 = load i32, i32* @SN_sha1
%16 = tail call i32 @EVP_add_digest_alias(i32 %15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @SN_sha1WithRSAEncryption
%18 = load i8*, i8** @SN_sha1WithRSA
%19 = tail call i32 @EVP_add_digest_alias(i32 %17, i8* %18)
%20 = tail call i32 (...) @EVP_dss1()
%21 = tail call i32 @EVP_add_digest(i32 %20)
%22 = load i32, i32* @SN_dsaWithSHA1
%23 = load i8*, i8** @SN_dsaWithSHA1_2
%24 = tail call i32 @EVP_add_digest_alias(i32 %22, i8* %23)
%25 = load i32, i32* @SN_dsaWithSHA1
%26 = tail call i32 @EVP_add_digest_alias(i32 %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%27 = load i32, i32* @SN_dsaWithSHA1
%28 = tail call i32 @EVP_add_digest_alias(i32 %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%29 = tail call i32 (...) @EVP_ecdsa()
%30 = tail call i32 @EVP_add_digest(i32 %29)
%31 = tail call i32 (...) @EVP_gostr341194()
%32 = tail call i32 @EVP_add_digest(i32 %31)
%33 = tail call i32 (...) @EVP_gost2814789imit()
%34 = tail call i32 @EVP_add_digest(i32 %33)
%35 = tail call i32 (...) @EVP_streebog256()
%36 = tail call i32 @EVP_add_digest(i32 %35)
%37 = tail call i32 (...) @EVP_streebog512()
%38 = tail call i32 @EVP_add_digest(i32 %37)
%39 = tail call i32 (...) @EVP_ripemd160()
%40 = tail call i32 @EVP_add_digest(i32 %39)
%41 = load i32, i32* @SN_ripemd160
%42 = tail call i32 @EVP_add_digest_alias(i32 %41, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%43 = load i32, i32* @SN_ripemd160
%44 = tail call i32 @EVP_add_digest_alias(i32 %43, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%45 = tail call i32 (...) @EVP_sha224()
%46 = tail call i32 @EVP_add_digest(i32 %45)
%47 = tail call i32 (...) @EVP_sha256()
%48 = tail call i32 @EVP_add_digest(i32 %47)
%49 = tail call i32 (...) @EVP_sha384()
%50 = tail call i32 @EVP_add_digest(i32 %49)
%51 = tail call i32 (...) @EVP_sha512()
%52 = tail call i32 @EVP_add_digest(i32 %51)
%53 = tail call i32 (...) @EVP_whirlpool()
%54 = tail call i32 @EVP_add_digest(i32 %53)
ret void
}