#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_PBE_alg_add(int /*<<< orphan*/, int /*<<< orphan*/ *,
                                   int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ *EVP_des_cbc();
int /*<<< orphan*/ *EVP_md2();
int /*<<< orphan*/ *EVP_md5();
int /*<<< orphan*/ *EVP_rc2_64_cbc();
int /*<<< orphan*/ *EVP_sha1();
int /*<<< orphan*/ NID_pbeWithMD2AndDES_CBC;
int /*<<< orphan*/ NID_pbeWithMD2AndRC2_CBC;
int /*<<< orphan*/ NID_pbeWithMD5AndDES_CBC;
int /*<<< orphan*/ NID_pbeWithMD5AndRC2_CBC;
int /*<<< orphan*/ NID_pbeWithSHA1AndDES_CBC;
int /*<<< orphan*/ NID_pbeWithSHA1AndRC2_CBC;
int /*<<< orphan*/ NID_pbes2;
int /*<<< orphan*/ PKCS5_PBE_keyivgen;
int /*<<< orphan*/ PKCS5_v2_PBE_keyivgen;
void PKCS5_PBE_add(void) {
  EVP_PBE_alg_add(NID_pbeWithMD5AndDES_CBC, EVP_des_cbc(), EVP_md5(),
                  PKCS5_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbeWithMD2AndDES_CBC, EVP_des_cbc(), EVP_md2(),
                  PKCS5_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbeWithSHA1AndDES_CBC, EVP_des_cbc(), EVP_sha1(),
                  PKCS5_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbeWithMD5AndRC2_CBC, EVP_rc2_64_cbc(), EVP_md5(),
                  PKCS5_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbeWithMD2AndRC2_CBC, EVP_rc2_64_cbc(), EVP_md2(),
                  PKCS5_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbeWithSHA1AndRC2_CBC, EVP_rc2_64_cbc(), EVP_sha1(),
                  PKCS5_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbes2, NULL, NULL, PKCS5_v2_PBE_keyivgen);
}


x86 assembly (clang, -O0):
<PKCS5_PBE_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x2e39(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    $0x0,%al
call   1080 <EVP_des_cbc@plt>
mov    %rax,-0x58(%rbp)
mov    $0x0,%al
call   1030 <EVP_md5@plt>
mov    -0x5c(%rbp),%edi
mov    -0x58(%rbp),%rsi
mov    %rax,%rdx
mov    0x2e49(%rip),%rax
mov    (%rax),%ecx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2e43(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    $0x0,%al
call   1080 <EVP_des_cbc@plt>
mov    %rax,-0x48(%rbp)
mov    $0x0,%al
call   1060 <EVP_md2@plt>
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%rsi
mov    %rax,%rdx
mov    0x2e13(%rip),%rax
mov    (%rax),%ecx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2dbd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    $0x0,%al
call   1080 <EVP_des_cbc@plt>
mov    %rax,-0x38(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0x3c(%rbp),%edi
mov    -0x38(%rbp),%rsi
mov    %rax,%rdx
mov    0x2ddd(%rip),%rax
mov    (%rax),%ecx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1070 <EVP_rc2_64_cbc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1030 <EVP_md5@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    %rax,%rdx
mov    0x2da7(%rip),%rax
mov    (%rax),%ecx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2d81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1070 <EVP_rc2_64_cbc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <EVP_md2@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
mov    0x2d71(%rip),%rax
mov    (%rax),%ecx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2d5b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1070 <EVP_rc2_64_cbc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    %rax,%rdx
mov    0x2d3b(%rip),%rax
mov    (%rax),%ecx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2d05(%rip),%rax
mov    (%rax),%edi
mov    0x2cf4(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1050 <EVP_PBE_alg_add@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS5_PBE_add>:
push   %rbp
push   %r14
push   %rbx
mov    0x2e3d(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1080 <EVP_des_cbc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <EVP_md5@plt>
mov    0x2e5b(%rip),%r14
mov    (%r14),%ecx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2e4c(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1080 <EVP_des_cbc@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1060 <EVP_md2@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %rax,%rdx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2dd2(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1080 <EVP_des_cbc@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %rax,%rdx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2de0(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1070 <EVP_rc2_64_cbc@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1030 <EVP_md5@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %rax,%rdx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2dae(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1070 <EVP_rc2_64_cbc@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1060 <EVP_md2@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %rax,%rdx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2d94(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1070 <EVP_rc2_64_cbc@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %rax,%rdx
call   1050 <EVP_PBE_alg_add@plt>
mov    0x2d4a(%rip),%rax
mov    (%rax),%edi
mov    0x2d39(%rip),%rax
mov    (%rax),%ecx
xor    %esi,%esi
xor    %edx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <EVP_PBE_alg_add@plt>

LLVM IR (-O0):
@NID_pbeWithMD5AndDES_CBC = global i32 0
@PKCS5_PBE_keyivgen = global i32 0
@NID_pbeWithMD2AndDES_CBC = global i32 0
@NID_pbeWithSHA1AndDES_CBC = global i32 0
@NID_pbeWithMD5AndRC2_CBC = global i32 0
@NID_pbeWithMD2AndRC2_CBC = global i32 0
@NID_pbeWithSHA1AndRC2_CBC = global i32 0
@NID_pbes2 = global i32 0
@PKCS5_v2_PBE_keyivgen = global i32 0
define void @PKCS5_PBE_add() {
%1 = load i32, i32* @NID_pbeWithMD5AndDES_CBC
%2 = call i32* (...) @EVP_des_cbc()
%3 = call i32* (...) @EVP_md5()
%4 = load i32, i32* @PKCS5_PBE_keyivgen
%5 = call i32 @EVP_PBE_alg_add(i32 %1, i32* %2, i32* %3, i32 %4)
%6 = load i32, i32* @NID_pbeWithMD2AndDES_CBC
%7 = call i32* (...) @EVP_des_cbc()
%8 = call i32* (...) @EVP_md2()
%9 = load i32, i32* @PKCS5_PBE_keyivgen
%10 = call i32 @EVP_PBE_alg_add(i32 %6, i32* %7, i32* %8, i32 %9)
%11 = load i32, i32* @NID_pbeWithSHA1AndDES_CBC
%12 = call i32* (...) @EVP_des_cbc()
%13 = call i32* (...) @EVP_sha1()
%14 = load i32, i32* @PKCS5_PBE_keyivgen
%15 = call i32 @EVP_PBE_alg_add(i32 %11, i32* %12, i32* %13, i32 %14)
%16 = load i32, i32* @NID_pbeWithMD5AndRC2_CBC
%17 = call i32* (...) @EVP_rc2_64_cbc()
%18 = call i32* (...) @EVP_md5()
%19 = load i32, i32* @PKCS5_PBE_keyivgen
%20 = call i32 @EVP_PBE_alg_add(i32 %16, i32* %17, i32* %18, i32 %19)
%21 = load i32, i32* @NID_pbeWithMD2AndRC2_CBC
%22 = call i32* (...) @EVP_rc2_64_cbc()
%23 = call i32* (...) @EVP_md2()
%24 = load i32, i32* @PKCS5_PBE_keyivgen
%25 = call i32 @EVP_PBE_alg_add(i32 %21, i32* %22, i32* %23, i32 %24)
%26 = load i32, i32* @NID_pbeWithSHA1AndRC2_CBC
%27 = call i32* (...) @EVP_rc2_64_cbc()
%28 = call i32* (...) @EVP_sha1()
%29 = load i32, i32* @PKCS5_PBE_keyivgen
%30 = call i32 @EVP_PBE_alg_add(i32 %26, i32* %27, i32* %28, i32 %29)
%31 = load i32, i32* @NID_pbes2
%32 = load i32, i32* @PKCS5_v2_PBE_keyivgen
%33 = call i32 @EVP_PBE_alg_add(i32 %31, i32* null, i32* null, i32 %32)
ret void
}

LLVM IR (-O2):
@NID_pbeWithMD5AndDES_CBC = global i32 0
@PKCS5_PBE_keyivgen = global i32 0
@NID_pbeWithMD2AndDES_CBC = global i32 0
@NID_pbeWithSHA1AndDES_CBC = global i32 0
@NID_pbeWithMD5AndRC2_CBC = global i32 0
@NID_pbeWithMD2AndRC2_CBC = global i32 0
@NID_pbeWithSHA1AndRC2_CBC = global i32 0
@NID_pbes2 = global i32 0
@PKCS5_v2_PBE_keyivgen = global i32 0
define void @PKCS5_PBE_add() {
%1 = load i32, i32* @NID_pbeWithMD5AndDES_CBC
%2 = tail call i32* (...) @EVP_des_cbc()
%3 = tail call i32* (...) @EVP_md5()
%4 = load i32, i32* @PKCS5_PBE_keyivgen
%5 = tail call i32 @EVP_PBE_alg_add(i32 %1, i32* %2, i32* %3, i32 %4)
%6 = load i32, i32* @NID_pbeWithMD2AndDES_CBC
%7 = tail call i32* (...) @EVP_des_cbc()
%8 = tail call i32* (...) @EVP_md2()
%9 = load i32, i32* @PKCS5_PBE_keyivgen
%10 = tail call i32 @EVP_PBE_alg_add(i32 %6, i32* %7, i32* %8, i32 %9)
%11 = load i32, i32* @NID_pbeWithSHA1AndDES_CBC
%12 = tail call i32* (...) @EVP_des_cbc()
%13 = tail call i32* (...) @EVP_sha1()
%14 = load i32, i32* @PKCS5_PBE_keyivgen
%15 = tail call i32 @EVP_PBE_alg_add(i32 %11, i32* %12, i32* %13, i32 %14)
%16 = load i32, i32* @NID_pbeWithMD5AndRC2_CBC
%17 = tail call i32* (...) @EVP_rc2_64_cbc()
%18 = tail call i32* (...) @EVP_md5()
%19 = load i32, i32* @PKCS5_PBE_keyivgen
%20 = tail call i32 @EVP_PBE_alg_add(i32 %16, i32* %17, i32* %18, i32 %19)
%21 = load i32, i32* @NID_pbeWithMD2AndRC2_CBC
%22 = tail call i32* (...) @EVP_rc2_64_cbc()
%23 = tail call i32* (...) @EVP_md2()
%24 = load i32, i32* @PKCS5_PBE_keyivgen
%25 = tail call i32 @EVP_PBE_alg_add(i32 %21, i32* %22, i32* %23, i32 %24)
%26 = load i32, i32* @NID_pbeWithSHA1AndRC2_CBC
%27 = tail call i32* (...) @EVP_rc2_64_cbc()
%28 = tail call i32* (...) @EVP_sha1()
%29 = load i32, i32* @PKCS5_PBE_keyivgen
%30 = tail call i32 @EVP_PBE_alg_add(i32 %26, i32* %27, i32* %28, i32 %29)
%31 = load i32, i32* @NID_pbes2
%32 = load i32, i32* @PKCS5_v2_PBE_keyivgen
%33 = tail call i32 @EVP_PBE_alg_add(i32 %31, i32* null, i32* null, i32 %32)
ret void
}