#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_sha1();
int PKCS5_PBKDF2_HMAC(char const *, int, unsigned char const *, int, int,
                      int /*<<< orphan*/, int, unsigned char *);
int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
                           const unsigned char *salt, int saltlen, int iter,
                           int keylen, unsigned char *out) {
  return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, EVP_sha1(),
                           keylen, out);
}


x86 assembly (clang, -O0):
<PKCS5_PBKDF2_HMAC_SHA1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    -0x48(%rbp),%rdi
mov    -0x3c(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    %eax,%r9d
mov    -0x24(%rbp),%r10d
mov    0x10(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <PKCS5_PBKDF2_HMAC@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS5_PBKDF2_HMAC_SHA1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %rdx,%r13
mov    %esi,%ebx
mov    %rdi,%rbp
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %eax,%r9d
push   0x40(%rsp)
push   %r14
call   1030 <PKCS5_PBKDF2_HMAC@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @PKCS5_PBKDF2_HMAC_SHA1(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store i8* %0, i8** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i8* %6, i8** %14
%15 = load i8*, i8** %8
%16 = load i32, i32* %9
%17 = load i8*, i8** %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = call i32 (...) @EVP_sha1()
%21 = load i32, i32* %13
%22 = load i8*, i8** %14
%23 = call i32 @PKCS5_PBKDF2_HMAC(i8* %15, i32 %16, i8* %17, i32 %18, i32 %19, i32 %20, i32 %21, i8* %22)
ret i32 %23
}

LLVM IR (-O2):
define i32 @PKCS5_PBKDF2_HMAC_SHA1(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i8* %6) {
%8 = tail call i32 (...) @EVP_sha1()
%9 = tail call i32 @PKCS5_PBKDF2_HMAC(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %8, i32 %5, i8* %6)
ret i32 %9
}