#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_ede3_cbc();
int /*<<< orphan*/ EVP_des_ede_cbc();
int /*<<< orphan*/ EVP_rc2_40_cbc();
int /*<<< orphan*/ EVP_rc2_cbc();
int /*<<< orphan*/ EVP_rc4();
int /*<<< orphan*/ EVP_rc4_40();
int /*<<< orphan*/ EVP_sha1();
int /*<<< orphan*/ NID_pbe_WithSHA1And128BitRC2_CBC;
int /*<<< orphan*/ NID_pbe_WithSHA1And128BitRC4;
int /*<<< orphan*/ NID_pbe_WithSHA1And2_Key_TripleDES_CBC;
int /*<<< orphan*/ NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
int /*<<< orphan*/ NID_pbe_WithSHA1And40BitRC2_CBC;
int /*<<< orphan*/ NID_pbe_WithSHA1And40BitRC4;
int /*<<< orphan*/ PKCS12_PBE_keyivgen;
void PKCS12_PBE_add(void) {
  EVP_PBE_alg_add(NID_pbe_WithSHA1And128BitRC4, EVP_rc4(), EVP_sha1(),
                  PKCS12_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC4, EVP_rc4_40(), EVP_sha1(),
                  PKCS12_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbe_WithSHA1And3_Key_TripleDES_CBC, EVP_des_ede3_cbc(),
                  EVP_sha1(), PKCS12_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbe_WithSHA1And2_Key_TripleDES_CBC, EVP_des_ede_cbc(),
                  EVP_sha1(), PKCS12_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbe_WithSHA1And128BitRC2_CBC, EVP_rc2_cbc(), EVP_sha1(),
                  PKCS12_PBE_keyivgen);
  EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC2_CBC, EVP_rc2_40_cbc(), EVP_sha1(),
                  PKCS12_PBE_keyivgen);
}


x86 assembly (clang, -O0):
<PKCS12_PBE_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x2e59(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   1060 <EVP_rc4@plt>
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0x30(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    %eax,%edx
mov    0x2e0c(%rip),%rax
mov    (%rax),%ecx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2e06(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1050 <EVP_rc4_40@plt>
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0x28(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    %eax,%edx
mov    0x2dd9(%rip),%rax
mov    (%rax),%ecx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1090 <EVP_des_ede3_cbc@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
mov    0x2da6(%rip),%rax
mov    (%rax),%ecx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1070 <EVP_des_ede_cbc@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
mov    0x2d73(%rip),%rax
mov    (%rax),%ecx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   10a0 <EVP_rc2_cbc@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    %eax,%edx
mov    0x2d40(%rip),%rax
mov    (%rax),%ecx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2d1a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <EVP_rc2_40_cbc@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    %eax,%edx
mov    0x2d0d(%rip),%rax
mov    (%rax),%ecx
call   1080 <EVP_PBE_alg_add@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS12_PBE_add>:
push   %rbp
push   %r14
push   %rbx
mov    0x2e5d(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1060 <EVP_rc4@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    0x2e1c(%rip),%r14
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2e0f(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1050 <EVP_rc4_40@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2df8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1090 <EVP_des_ede3_cbc@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2db1(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1070 <EVP_des_ede_cbc@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2db2(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   10a0 <EVP_rc2_cbc@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1080 <EVP_PBE_alg_add@plt>
mov    0x2d53(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <EVP_rc2_40_cbc@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    (%r14),%ecx
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1080 <EVP_PBE_alg_add@plt>

LLVM IR (-O0):
@NID_pbe_WithSHA1And128BitRC4 = global i32 0
@PKCS12_PBE_keyivgen = global i32 0
@NID_pbe_WithSHA1And40BitRC4 = global i32 0
@NID_pbe_WithSHA1And3_Key_TripleDES_CBC = global i32 0
@NID_pbe_WithSHA1And2_Key_TripleDES_CBC = global i32 0
@NID_pbe_WithSHA1And128BitRC2_CBC = global i32 0
@NID_pbe_WithSHA1And40BitRC2_CBC = global i32 0
define void @PKCS12_PBE_add() {
%1 = load i32, i32* @NID_pbe_WithSHA1And128BitRC4
%2 = call i32 (...) @EVP_rc4()
%3 = call i32 (...) @EVP_sha1()
%4 = load i32, i32* @PKCS12_PBE_keyivgen
%5 = call i32 @EVP_PBE_alg_add(i32 %1, i32 %2, i32 %3, i32 %4)
%6 = load i32, i32* @NID_pbe_WithSHA1And40BitRC4
%7 = call i32 (...) @EVP_rc4_40()
%8 = call i32 (...) @EVP_sha1()
%9 = load i32, i32* @PKCS12_PBE_keyivgen
%10 = call i32 @EVP_PBE_alg_add(i32 %6, i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* @NID_pbe_WithSHA1And3_Key_TripleDES_CBC
%12 = call i32 (...) @EVP_des_ede3_cbc()
%13 = call i32 (...) @EVP_sha1()
%14 = load i32, i32* @PKCS12_PBE_keyivgen
%15 = call i32 @EVP_PBE_alg_add(i32 %11, i32 %12, i32 %13, i32 %14)
%16 = load i32, i32* @NID_pbe_WithSHA1And2_Key_TripleDES_CBC
%17 = call i32 (...) @EVP_des_ede_cbc()
%18 = call i32 (...) @EVP_sha1()
%19 = load i32, i32* @PKCS12_PBE_keyivgen
%20 = call i32 @EVP_PBE_alg_add(i32 %16, i32 %17, i32 %18, i32 %19)
%21 = load i32, i32* @NID_pbe_WithSHA1And128BitRC2_CBC
%22 = call i32 (...) @EVP_rc2_cbc()
%23 = call i32 (...) @EVP_sha1()
%24 = load i32, i32* @PKCS12_PBE_keyivgen
%25 = call i32 @EVP_PBE_alg_add(i32 %21, i32 %22, i32 %23, i32 %24)
%26 = load i32, i32* @NID_pbe_WithSHA1And40BitRC2_CBC
%27 = call i32 (...) @EVP_rc2_40_cbc()
%28 = call i32 (...) @EVP_sha1()
%29 = load i32, i32* @PKCS12_PBE_keyivgen
%30 = call i32 @EVP_PBE_alg_add(i32 %26, i32 %27, i32 %28, i32 %29)
ret void
}

LLVM IR (-O2):
@NID_pbe_WithSHA1And128BitRC4 = global i32 0
@PKCS12_PBE_keyivgen = global i32 0
@NID_pbe_WithSHA1And40BitRC4 = global i32 0
@NID_pbe_WithSHA1And3_Key_TripleDES_CBC = global i32 0
@NID_pbe_WithSHA1And2_Key_TripleDES_CBC = global i32 0
@NID_pbe_WithSHA1And128BitRC2_CBC = global i32 0
@NID_pbe_WithSHA1And40BitRC2_CBC = global i32 0
define void @PKCS12_PBE_add() {
%1 = load i32, i32* @NID_pbe_WithSHA1And128BitRC4
%2 = tail call i32 (...) @EVP_rc4()
%3 = tail call i32 (...) @EVP_sha1()
%4 = load i32, i32* @PKCS12_PBE_keyivgen
%5 = tail call i32 @EVP_PBE_alg_add(i32 %1, i32 %2, i32 %3, i32 %4)
%6 = load i32, i32* @NID_pbe_WithSHA1And40BitRC4
%7 = tail call i32 (...) @EVP_rc4_40()
%8 = tail call i32 (...) @EVP_sha1()
%9 = load i32, i32* @PKCS12_PBE_keyivgen
%10 = tail call i32 @EVP_PBE_alg_add(i32 %6, i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* @NID_pbe_WithSHA1And3_Key_TripleDES_CBC
%12 = tail call i32 (...) @EVP_des_ede3_cbc()
%13 = tail call i32 (...) @EVP_sha1()
%14 = load i32, i32* @PKCS12_PBE_keyivgen
%15 = tail call i32 @EVP_PBE_alg_add(i32 %11, i32 %12, i32 %13, i32 %14)
%16 = load i32, i32* @NID_pbe_WithSHA1And2_Key_TripleDES_CBC
%17 = tail call i32 (...) @EVP_des_ede_cbc()
%18 = tail call i32 (...) @EVP_sha1()
%19 = load i32, i32* @PKCS12_PBE_keyivgen
%20 = tail call i32 @EVP_PBE_alg_add(i32 %16, i32 %17, i32 %18, i32 %19)
%21 = load i32, i32* @NID_pbe_WithSHA1And128BitRC2_CBC
%22 = tail call i32 (...) @EVP_rc2_cbc()
%23 = tail call i32 (...) @EVP_sha1()
%24 = load i32, i32* @PKCS12_PBE_keyivgen
%25 = tail call i32 @EVP_PBE_alg_add(i32 %21, i32 %22, i32 %23, i32 %24)
%26 = load i32, i32* @NID_pbe_WithSHA1And40BitRC2_CBC
%27 = tail call i32 (...) @EVP_rc2_40_cbc()
%28 = tail call i32 (...) @EVP_sha1()
%29 = load i32, i32* @PKCS12_PBE_keyivgen
%30 = tail call i32 @EVP_PBE_alg_add(i32 %26, i32 %27, i32 %28, i32 %29)
ret void
}