#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*/ MD5_String2binary(char const *, unsigned char *);
int /*<<< orphan*/ sprintf(char *, char *, unsigned char, unsigned char,
                           unsigned char, unsigned char, unsigned char,
                           unsigned char, unsigned char, unsigned char,
                           unsigned char, unsigned char, unsigned char,
                           unsigned char, unsigned char, unsigned char,
                           unsigned char, unsigned char);
void MD5_String(const char *string, char *output) {
  unsigned char digest[16];
  MD5_String2binary(string, digest);
  sprintf(output,
          "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
          digest[0], digest[1], digest[2], digest[3], digest[4], digest[5],
          digest[6], digest[7], digest[8], digest[9], digest[10], digest[11],
          digest[12], digest[13], digest[14], digest[15]);
}


x86 assembly (clang, -O0):
<MD5_String>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <MD5_String2binary@plt>
mov    -0x38(%rbp),%rdi
mov    -0x50(%rbp),%dl
mov    -0x4f(%rbp),%cl
mov    -0x4e(%rbp),%r8b
mov    -0x4d(%rbp),%r9b
mov    -0x4c(%rbp),%al
mov    -0x4b(%rbp),%sil
mov    %sil,-0x53(%rbp)
mov    -0x4a(%rbp),%sil
mov    %sil,-0x52(%rbp)
mov    -0x49(%rbp),%r13b
mov    -0x48(%rbp),%r12b
mov    -0x47(%rbp),%r15b
mov    -0x46(%rbp),%r14b
mov    -0x45(%rbp),%bl
mov    -0x44(%rbp),%r11b
mov    -0x43(%rbp),%r10b
mov    -0x42(%rbp),%sil
mov    %sil,-0x51(%rbp)
lea    0xe68(%rip),%rsi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl %r9b,%r9d
movzbl %al,%eax
mov    %eax,(%rsp)
mov    -0x53(%rbp),%al
movzbl %al,%eax
mov    %eax,0x8(%rsp)
mov    -0x52(%rbp),%al
movzbl %al,%eax
mov    %eax,0x10(%rsp)
mov    -0x51(%rbp),%al
movzbl %r13b,%r13d
mov    %r13d,0x18(%rsp)
movzbl %r12b,%r12d
mov    %r12d,0x20(%rsp)
movzbl %r15b,%r15d
mov    %r15d,0x28(%rsp)
movzbl %r14b,%r14d
mov    %r14d,0x30(%rsp)
movzbl %bl,%ebx
mov    %ebx,0x38(%rsp)
movzbl %r11b,%r11d
mov    %r11d,0x40(%rsp)
movzbl %r10b,%r10d
mov    %r10d,0x48(%rsp)
movzbl %al,%eax
mov    %eax,0x50(%rsp)
movzbl -0x41(%rbp),%eax
mov    %eax,0x58(%rsp)
call   1040 <sprintf@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<MD5_String>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbx
mov    %rsp,%rsi
call   1030 <MD5_String2binary@plt>
movzbl (%rsp),%edx
movzbl 0x1(%rsp),%ecx
movzbl 0x2(%rsp),%r8d
movzbl 0x3(%rsp),%r9d
movzbl 0x4(%rsp),%eax
mov    %rax,0x30(%rsp)
movzbl 0x5(%rsp),%eax
mov    %rax,0x28(%rsp)
movzbl 0x6(%rsp),%eax
mov    %rax,0x20(%rsp)
movzbl 0x7(%rsp),%eax
mov    %rax,0x18(%rsp)
movzbl 0x8(%rsp),%r12d
movzbl 0x9(%rsp),%r13d
movzbl 0xa(%rsp),%eax
movzbl 0xb(%rsp),%ebp
movzbl 0xc(%rsp),%r10d
movzbl 0xd(%rsp),%r11d
movzbl 0xe(%rsp),%r14d
movzbl 0xf(%rsp),%r15d
lea    0xe55(%rip),%rsi
mov    %rbx,%rdi
push   %r15
push   %r14
push   %r11
push   %r10
push   %rbp
push   %rax
push   %r13
push   %r12
push   0x58(%rsp)
push   0x68(%rsp)
push   0x78(%rsp)
push   0x88(%rsp)
call   1040 <sprintf@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [65 x i8] c"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\00"
define void @MD5_String(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [16 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%8 = call i32 @MD5_String2binary(i8* %6, i8* %7)
%9 = load i8*, i8** %4
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%11 = load i8, i8* %10
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 1
%13 = load i8, i8* %12
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 2
%15 = load i8, i8* %14
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 3
%17 = load i8, i8* %16
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 4
%19 = load i8, i8* %18
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 5
%21 = load i8, i8* %20
%22 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 6
%23 = load i8, i8* %22
%24 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 7
%25 = load i8, i8* %24
%26 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 8
%27 = load i8, i8* %26
%28 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 9
%29 = load i8, i8* %28
%30 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 10
%31 = load i8, i8* %30
%32 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 11
%33 = load i8, i8* %32
%34 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 12
%35 = load i8, i8* %34
%36 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 13
%37 = load i8, i8* %36
%38 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 14
%39 = load i8, i8* %38
%40 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 15
%41 = load i8, i8* %40
%42 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8 zeroext %11, i8 zeroext %13, i8 zeroext %15, i8 zeroext %17, i8 zeroext %19, i8 zeroext %21, i8 zeroext %23, i8 zeroext %25, i8 zeroext %27, i8 zeroext %29, i8 zeroext %31, i8 zeroext %33, i8 zeroext %35, i8 zeroext %37, i8 zeroext %39, i8 zeroext %41)
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\00"
define void @MD5_String(i8* %0, i8* nocapture writeonly %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @MD5_String2binary(i8* %0, i8* %4)
%6 = load i8, i8* %4
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 1
%8 = load i8, i8* %7
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 2
%10 = load i8, i8* %9
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 3
%12 = load i8, i8* %11
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 4
%14 = load i8, i8* %13
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 5
%16 = load i8, i8* %15
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 6
%18 = load i8, i8* %17
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 7
%20 = load i8, i8* %19
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 8
%22 = load i8, i8* %21
%23 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 9
%24 = load i8, i8* %23
%25 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 10
%26 = load i8, i8* %25
%27 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 11
%28 = load i8, i8* %27
%29 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 12
%30 = load i8, i8* %29
%31 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 13
%32 = load i8, i8* %31
%33 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 14
%34 = load i8, i8* %33
%35 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 15
%36 = load i8, i8* %35
%37 = call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8 zeroext %6, i8 zeroext %8, i8 zeroext %10, i8 zeroext %12, i8 zeroext %14, i8 zeroext %16, i8 zeroext %18, i8 zeroext %20, i8 zeroext %22, i8 zeroext %24, i8 zeroext %26, i8 zeroext %28, i8 zeroext %30, i8 zeroext %32, i8 zeroext %34, i8 zeroext %36)
ret void
}