#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*/ ssl_md5_clear(void *);
int /*<<< orphan*/ ssl_md5_complete(void *, char *);
void *ssl_md5_info_create();
int /*<<< orphan*/ ssl_md5_info_delete(void *);
int /*<<< orphan*/ ssl_md5_transform(void *, char *, int);
void rdp_sec_hash_16(char *out, char *in, char *salt1, char *salt2) {
  void *md5_info;
  md5_info = ssl_md5_info_create();
  ssl_md5_clear(md5_info);
  ssl_md5_transform(md5_info, in, 16);
  ssl_md5_transform(md5_info, salt1, 32);
  ssl_md5_transform(md5_info, salt2, 32);
  ssl_md5_complete(md5_info, out);
  ssl_md5_info_delete(md5_info);
}


x86 assembly (clang, -O0):
<rdp_sec_hash_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1050 <ssl_md5_info_create@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <ssl_md5_clear@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x10,%edx
call   1060 <ssl_md5_transform@plt>
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x20,%edx
call   1060 <ssl_md5_transform@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x20,%edx
call   1060 <ssl_md5_transform@plt>
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1070 <ssl_md5_complete@plt>
mov    -0x28(%rbp),%rdi
call   1040 <ssl_md5_info_delete@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdp_sec_hash_16>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%r14
xor    %eax,%eax
call   1050 <ssl_md5_info_create@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <ssl_md5_clear@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x10,%edx
call   1060 <ssl_md5_transform@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x20,%edx
call   1060 <ssl_md5_transform@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x20,%edx
call   1060 <ssl_md5_transform@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <ssl_md5_complete@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1040 <ssl_md5_info_delete@plt>

LLVM IR (-O0):
define void @rdp_sec_hash_16(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = call i8* (...) @ssl_md5_info_create()
store i8* %10, i8** %9
%11 = load i8*, i8** %9
%12 = call i32 @ssl_md5_clear(i8* %11)
%13 = load i8*, i8** %9
%14 = load i8*, i8** %6
%15 = call i32 @ssl_md5_transform(i8* %13, i8* %14, i32 16)
%16 = load i8*, i8** %9
%17 = load i8*, i8** %7
%18 = call i32 @ssl_md5_transform(i8* %16, i8* %17, i32 32)
%19 = load i8*, i8** %9
%20 = load i8*, i8** %8
%21 = call i32 @ssl_md5_transform(i8* %19, i8* %20, i32 32)
%22 = load i8*, i8** %9
%23 = load i8*, i8** %5
%24 = call i32 @ssl_md5_complete(i8* %22, i8* %23)
%25 = load i8*, i8** %9
%26 = call i32 @ssl_md5_info_delete(i8* %25)
ret void
}

LLVM IR (-O2):
define void @rdp_sec_hash_16(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i8* (...) @ssl_md5_info_create()
%6 = tail call i32 @ssl_md5_clear(i8* %5)
%7 = tail call i32 @ssl_md5_transform(i8* %5, i8* %1, i32 16)
%8 = tail call i32 @ssl_md5_transform(i8* %5, i8* %2, i32 32)
%9 = tail call i32 @ssl_md5_transform(i8* %5, i8* %3, i32 32)
%10 = tail call i32 @ssl_md5_complete(i8* %5, i8* %0)
%11 = tail call i32 @ssl_md5_info_delete(i8* %5)
ret void
}